[Solution] Mario and Transformation solution codechef

Mario and Transformation solution codechef – Mario transforms each time he eats a mushroom as follows:

  • If he is currently small, he turns normal.
  • If he is currently normal, he turns huge.
  • If he is currently huge, he turns small.

Given that Mario was initially normal, find his size after eating XX mushrooms.

[Solution] Mario and Transformation solution codechef

  • 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:

  • 𝙽𝙾𝚁𝙼𝙰𝙻NORMAL, if his final size is normal.
  • 𝙷𝚄𝙶𝙴HUGE, if his final size is huge.
  • 𝚂𝙼𝙰𝙻𝙻SMALL, if his final size is small.

You may print each character of the answer in either uppercase or lowercase (for example, the strings 𝙷𝚞𝚐𝚎Huge𝚑𝚄𝚐𝙴hUgE𝚑𝚞𝚐𝚎huge and 𝙷𝚄𝙶𝙴HUGE will all be treated as identical).

[Solution] Mario and Transformation solution codechef

  • 1T1001≤T≤100
  • 1X1001≤X≤100

Sample Input 1 

3
2
4
12

Sample Output 1 

SMALL
HUGE
NORMAL

Mario and Transformation solution Explanation

Test case 11: Mario’s initial size is normal. On eating the first mushroom, he turns huge. On eating the second mushroom, he turns small.

Test case 22: Mario’s initial size is normal. On eating the first mushroom, he turns huge. On eating the second mushroom, he turns small. On eating the third mushroom, he turns normal. On eating the fourth mushroom, he turns huge.

Leave a Comment