Facebook has gone through many changes. Nowadays, Facebook has a choice of five reactions to give on…
Click here to read the complete problem statement.
If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.
@anas_20101149 You got runtime error, because you didn’t take input properly. Read the question well. The first line contains an integer T (1 ≤ T ≤ 100) indicating the number of test cases.
Each test case consists of five lines.
Each line will start with a string S, denoting the type of reaction (Like, Haha, Sad, Love, Angry) and its corresponding clicked value K (0 ≤ K ≤ 1000000).
Each testcases required five line. So, you have to take input like 5 time.
But you didn’t do it in your code. So, you got RE. You took input later in while loop. and before taking input you print a reaction.