| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 (추가 시간 없음) | 1024 MB | 413 | 215 | 191 | 50.933% |
There are many number kinds out there and I am sure you know some of them already! To name a few:
O): 1,ドル 3, 5, 7, 9, \ldots$S): 0,ドル 1, 4, 9, 16, 25, \ldots$In this problem, you just need to output whether a given number $N$ is one of these special kinds of numbers. Print O if $N$ is odd, S if it's a perfect square, and OS if $N$ is both odd and a perfect square. If $N$ isn't either kind of special number, print EMPTY instead.
The first line of input consists of an integer $T$ $(1 \leq T \leq 10^5),ドル the number of test cases.
The remaining $T$ lines each contains a single integer $N$ $(0 \leq N \leq 10^6)$.
Print $T$ lines, one per test case. On each line, print either O or S or OS or EMPTY, as described above.
4 1 7 20 9
OS O EMPTY OS
ICPC > Regionals > North America > Mid-Central Regional > 2024 Mid-Central USA Programming Contest O번