No.1129 Rating Rock-Paper-Scissors
問題文最終更新日: 2022-04-25 23:37:25
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
Problem Statement
Rating Rock-Paper-Scissors is a game played under the following rules.
- $2$ players independently choose one of the hands Rock, Scissors, or Paper.
- If the
Ratingvalues of the $2$ players are not equal, the player with the higherRatingis the winner. - If the
Ratingvalues of the $2$ players are equal and the hands played by the $2$ players are different, the winner of ordinary rock-paper-scissors is the winner. - If the
Ratingvalues of the $2$ players are equal and the hands played by the $2$ players are also the same, the game is a draw.
Rating $A$ and rock-paper-scissors hand $B$, and tRue's Rating $C$ and rock-paper-scissors hand $D$. Output the winner. If the game is a draw, output Draw.The rules of rock-paper-scissors follow the standard rules. (Wikipedia)
Constraints
- $0 \le A,C \le 4000$
- $0 \le B,D \le 2$
- All inputs are integers.
- For each of $B,D$, $0$ represents Rock, $1$ represents Scissors, and $2$ represents Paper.
Input
$A\ B\ C\ D$
Output
Output the winner. Specifically, output one of null, tRue, or Draw.
Print a newline at the end.
Sample
Sample 1
Input
688 0 1518 0
Output
tRue
Sample 2
Input
4000 1 4000 2
Output
null
Source
Beginners After Typhoon Contest#01: B - Rating Rock-Paper-Scissors
writer: null
tester: Nanashi, leafirby, QCFium
This problem was ported in accordance with HackerRank's terms. Some parts have been modified.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
null
leafirby