Under construction

Still being built. Things may change

Odd vs. Even Showdown

Time limit1sMemory limit512 MB

Summary
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 nn, are there more even numbers or more odd numbers?

Input

The first line gives the number of test cases TT (0≤T≤1 000 0000 \le T \le 1\,000\,000). Each test case consists of a single line containing a natural number nn with 1≤n≤1091 \le n \le 10^9.

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 k≥1k \ge 1 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 kk is even; otherwise kk is odd. (When k=1k = 1, 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.

Examples1

  1. Example 1

    Input
    0
    
    Expected output