MY PROBLEM DOESENT PASS ALL TESTCASES
@navin
your logic is not correct, why your ans is “NO” if countSetBits(in)>1. Consider the number 9, it is T-prime since it has 3 divisor (1,3,9) but your code return “NO” because countSetbits(9)=2.
Please check your logic.
@navin
argument of n of isPerfectSquare() function can be upto 10^12 which cant be stored in int. Change line 7 to bool isPerfectSquare(long long int n) and line 9 for (long long int i = 1; i * i <= n; i++)