SP17002 PSYCHO2 - Psycho Function
Description
**Problem Statement:**
```
The number N is called “Psycho Number” . Psycho Number is calculated as follows:
First, If we factorize N , then we have some prime and their power. Assume that, there are M powers. From M powers , you should count the number of even and odd powers. Then if the number of even power is strictly greater than odd power , then we call the number N is “Psycho Number”, otherwise the number N is call “Ordinary Number”.
As for example, if N = 67500 then prime factorization, 67500 = 22 x 33 x 54. Count even powers and odd powers . This number have 2 even power(2,4) and 1 odd power ( 3 ). Since even power 2 (2,4) is greater than odd power 1 (3), so the number 67500 is a Psycho Number.
Now , You have to find the psycho number or Ordinary Number of the following function:
bool isPsycho( long long K, long long b, long long p)
{
N = numberoftrailingzeros ( K ! ) * lastdigit ( bp ) ;
if( N == psychonumber ) return true;
else
return false;
}
```
For example , if k = 10 , b= 12 , p = 1 then the N is 4 and it's a psycho number.
10 ! = 3628800 , number of trailingzeros is 2.
12 $ ^{1} $ $ ^{} $ = 12 , last digit is 2.
so N = 4 then 4 = 2 $ ^{2} $ . even power is greater than odd power, so the number 4 is a Psycho Number.**Input:**
An integer **T** (1
Input Format
N/A
Output Format
N/A