Least divisor. Given an integer not less than 2, print its smallest integer divisor greater than 1.
Test Case | Input (Integer) | Expected Output |
---|---|---|
1 | 10 | 2 |
2 | 15 | 3 |
3 | 17 | 17 |
Python, Java
Least divisor. Given an integer not less than 2, print its smallest integer divisor greater than 1.
Test Case | Input (Integer) | Expected Output |
---|---|---|
1 | 10 | 2 |
2 | 15 | 3 |
3 | 17 | 17 |