~/algor $ cat problems/case-tosh-qaychi-qogoz
Rock, paper, scissors
Easy
1000 ms
64 MB
22%
The moves of two players in rock, paper, scissors are given (t — rock, q — scissors, g — paper). Rules: rock beats scissors, scissors cut paper, paper covers rock. Determine the result: print $1$ if the first player wins, $2$ if the second player wins, and $0$ for a draw.
Input
One line with two characters: the first and the second player's choice.
Output
One integer: $1$, $2$ or $0$.
Note
The characters are only t, q or g.
Examples
Input #1
t q
Output #1
1
Input #2
g q
Output #2
2