Time Limit: 1 sec
An integer n is said to be divisible by an integer b if n = bq for any integer q, where b is not equal to zero.
And 10 is divisible by 5, because 10÷5 = 2 exactly
And 14 is divisible by 7, because 14÷7 = 2 exactly
But 15 is not divisible by 7, because 15÷7 = 2 1/7
(i.e., the result is not an integer number)
Write a simple program that reads an integer number n, print “n is divisible by 5” if n is divisible by 5 or print “n is divisible by 7” if n is divisible by 7 otherwise print “Confused”.
There are several lines of input in the input file, and each line contains a positive integer n (0<= n <10100). Input is terminated by EOF.
For each line of input, you have to print a line of output. If n is divisible by 5 then print “n is divisible by 5” and if n is divisible by 7 then print “n is divisible by 7”, otherwise print “Confused” without quotes. Follow the sample input/output for exact format.
21 is divisible by 7
20 is divisible by 5
ISCPC 2017 Preliminary
Problem Setter: Shahin ShamS