PSYCHON - Psycho
Given an integer N, 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.
An integer T (1 <= T <= 106) denoting the number of test cases followed by T lines. Each containing a single integer N ( 1 <= N <= 107 ) .
For each case print “Psycho Number” or “Ordinary Number”.
Note : 0 and 1 is not a psycho number .
Psycho 2 : Psycho Function
Psycho 3 : Make PsychoPsycho 4 : Psycho34 (easy)
Problem setter: Shipu Ahamed, Dept. of CSE
Bangladesh University of Business and Technology (BUBT)
cin/cout gives tle... use scanf,printf
any ideas on how to solve this question ??
Nice Question !!!
why am i receiving a SIGSEGV error....:(
Really nice que!!
Don't use fast I/O. It's giving TLE.
Finally after 7 WA and 5 Tle ...... AC :)
nice one..:)Last edit: 2015-03-10 05:17:51
I wonder why fast I/O gives a TLE and scanf/printf ACs in 0.32.