Even? Odd?
InterviewTime limit2sMemory limit256 MB
Decide for each of up to 100 numbers up to 1e18 whether its divisor count is odd or even.
- Level
Easy3 of 10
- Topics
- Number theory, Math
- Solved
- No attempts yet
Problem
If the remainder of divided by is , then is a divisor of . (, ) For example, the divisors of are , , , .
Decide whether a given number has an odd or an even number of divisors.
Input
The first line contains the number of tests . ()
The second line contains numbers , separated by spaces, whose divisor counts you must classify. ()
Output
For each number print if its divisor count is odd and if it is even. Print the answers on one line in the input order, separated by single spaces.