Finger Game
Time limit1sMemory limit1024 MB
Given the finger counts of two players, decide whether the first wins (>), the second wins (<), or neither does (=) under rock, scissors, paper rules.
- Level
Easy1 of 10
- Topics
- Implementation, Simulation
- Solved
- No attempts yet
Problem
A finger game is a game in which two players simultaneously extend a set number of fingers to form a sign and compete against each other. A player extends fingers for the 'rock' sign (that is, no fingers extended), fingers for the 'scissors' sign, and fingers for the 'paper' sign. Extending any other number of fingers counts as making the 'invalid' sign.
If both players make the same sign, neither wins. The matchups between signs are as follows.
- A player who makes any sign other than 'invalid' beats a player who makes 'invalid'.
- 'Rock' beats 'scissors', 'scissors' beats 'paper', and 'paper' beats 'rock'.
Junseong and Ikjun want to play a finger game. Look at the number of fingers each one extends and determine the winner.
Input
The first line contains the number of fingers extended by Junseong and the number of fingers extended by Ikjun, separated by a space.
Each count is an integer from to , inclusive.
Output
On the first line, print > if Junseong wins, < if Ikjun wins, or = if neither wins.