Odd vs. Even Showdown
Time limit1sMemory limit512 MB
Given n, count how many numbers from 1 to n have an odd number of prime factors (with multiplicity) and compare against the rest.
- Level
Easy2 of 10
- Topics
- Math, Number theory, Combinatorics, Implementation
- Solved
- No attempts yet
Problem
Among the natural numbers from 1 to , are there more even numbers or more odd numbers?
Input
The first line gives the number of test cases (). Each test case consists of a single line containing a natural number with .
Output
For each test case, print O on its own line if the even numbers are not fewer than the odd numbers, and E otherwise.

Yes, that must surely be correct...
Hint
The problem is so easy that, to make it at least a little trashy, the samples have been hidden.
Source
Contest > Gudeogi Cup > True Final Gudeogi Cup 2 Problem 🆚
- Problem author: jh05013
Scoring
- The samples are not scored.
True Notes
Unlike the usual definitions, this problem defines odd and even as follows.
Every natural number can be written as a product of primes, and that representation is unique up to the order of the primes. If the number of primes used is not a multiple of 2, then is even; otherwise is odd. (When , it is the product of 0 primes, and 0 is a multiple of 2.) If the same prime is used several times, each use must be counted separately.