← All problemsSign in

Penalty Shoot-out

CodeChefRating 869Open on judge ↗

In a football match, a penalty shootout is used to determine the winner if the score is tied after regulation and extra time. Each team takes turns attempting five penalty kicks. Team A has scored $X$ goals in $3$ turns while team B has scored $Y$ goals in $4$ turns. Determine if it's possible for the penalty shootout to end with equal score after both teams have taken all $5$ of their penalty

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