본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 32682번 Which Number Kind Is It?

by 현장 2024. 12. 12.

-Code

from math import sqrt
from sys import stdin
input = stdin.readline

for _ in range(int(input())):
    n = int(input())
    res = ""

    if n % 2 == 1:
        res += "O"
    if int(sqrt(n)) ** 2 == n:
        res += "S"
    if res == "":
        res = "EMPTY"

    print(res)