← All problemsSign in

TNP CHALLENGE 504

It is free time in school and heavy rain outside. So students have to sit in class and wait for 1 hour for next period. Here two friends Aaron and Ben play the Rock Paper Scissors game. You are there friend and need to determine who wins. Both players can choose moves from the set {R,P,S}. The game is a draw if both players choose the same item. The winning rules of RPS are given below:

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start