No.8032 Unavailability of Inequality Signs
タグ : / 解いたユーザー数 134
作問者 :
はむ吉🐹
Note
Depending on the programming language you choose, this problem may be difficult to solve.
In particular, it may be impossible to solve this problem in C++ or PHP.
If you cannot get an accepted solution in the language you usually use, we apologize for the inconvenience, but please consider using another language.
The problem author has confirmed that the problem can be solved in C, C#, Python, Ruby, and others.
Problem Statement
Taro has $N$ pairs of natural numbers $(a_i, b_i)\:(i = 0, 1, \cdots, N - 1)$.
He wanted to write a program that compares the magnitudes of $a_i$ and $b_i$ for each pair $(a_i, b_i)$.
However, for whatever reason,
he cannot type < and > into his computer no matter what he tries.
Taro is at a loss, so please write the above program in his place.
Of course, the source code you submit must not contain even a single character of < or >.
Input
$N$
$a_0$ $b_0$
$a_1$ $b_1$
$\vdots$
$a_i$ $b_i$
$\vdots$
$a_{N-1}$ $b_{N-1}$
The input consists of $(N + 1)$ lines in total.
Line 0 contains a natural number $N\:(1\le N\le 100)$.
Line $(i + 1)$ $(i = 0, 1, \cdots, N - 1)$ contains
natural numbers $a_i\:(1\le a_i \le 10^8)$ and $b_i\:(1\le b_i \le 10^8)$, separated by a space.
Here, if $i\ne j$, then $(a_i, b_i) \ne (a_j, b_j)$ holds.
Output
$S_0$
$S_1$
$\vdots$
$S_i$
$\vdots$
$S_{N - 1}$
The output consists of $N$ lines in total.
On line $i$ $(i = 0, 1, \cdots, N - 1)$, print the character (string) $S_i$ defined as follows.
- If $a_i \gt b_i$, $S_i$ is
> - If $a_i = b_i$, $S_i$ is
= - If $a_i \lt b_i$, $S_i$ is
<
Print a newline at the end.
However, if the source code contains even one character of at least one of < and >, it will be judged incorrect regardless of its output.
Note that the output may contain < and >, but the source code must not contain these symbols.
Sample
Sample 1
Input
3 7 7 1 10 5 3
Output
= < >
Sample 2
Input
4 83 17 1 1 200 200 24 69
Output
> = = <
Sample 3
Input
6 1 1 10 10 38 198 5 5 97 97 12 39
Output
= = < = = <
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。