Codechef•Jun 06, 2025
Mario and Transformation
Hazrat Ali
Codechef
Mario transforms each time he eats a mushroom as follows
- If he is currently
small, he turnsnormal. - If he is currently
normal, he turnshuge. - If he is currently
huge, he turnssmall.
Given that Mario was initially normal, find his size after eating XX mushrooms.
Input Format
- The first line of input will contain one integer TT, the number of test cases. Then the test cases follow.
- Each test case contains a single line of input, containing one integer XX.
Output Format
For each test case, output in a single line Mario's size after eating XX mushrooms.
Print:
- NORMALNORMAL, if his final size is
normal. - HUGEHUGE, if his final size is
huge. - SMALLSMALL, if his final size is
small.
You may print each character of the answer in either uppercase or lowercase (for example, the strings HugeHuge, hUgEhUgE, hugehuge and HUGEHUGE will all be treated as identical).
Constraints
- 1≤T≤100
- 1≤X≤100
Sample 1:
Input
3 2 4 12
Output
SMALL HUGE NORMAL
Solution
t = int(input())
while t != 0:
X = int(input())
if X % 3 == 0:
print("NORMAL")
elif (X + 1) % 3 == 0:
print("SMALL")
elif (X + 2) % 3 == 0:
print("HUGE")
t -= 1