Actual Question: Check if the given integer has only one factor other than 1 and the number itself


#1

If not then return 0 else 1


#2

Not really, 100 has factors 2, 5, 10, 20 , 25, 50 but still can be represented as 10^2, A = 10 and P = 2;