fb pixel

Smallest divisor of n

Given an integer n, we are interested in the smallest divisor of n (other than 1).
The program input contains a single number n.
The program should print the smallest divisor of n.
Input
Output
8
2
7
7
385
5
 
To check your solution you need to sign in
Sign in to continue