Uncommon Number
Given a number N, find whether the number is common or uncommon. A number is considered uncommon if it is not divisible by any of the single-digit primes.
Input
The first line of input is an integer N.
Output
The output should be a single line containing True if it satisfies the given conditions, False in all other cases.
Explanation
In the given example,
N = 5633 the number is not divisible by 2, 3, 5, 7. So, the number is an uncommon number.
Therefore, the output should be
True.
Sample Input 1
5633
Sample Output 1
True
Sample Input 2
1000
Sample Output 2
False
N=int(input("Enter an interger: "))
if (N%2==0 or N%3==0 or N%5==0 or N%7==0):
print("False")
else:
print("True")
Comments
Leave a comment