A14708 | Long Comparison
时间限制1s
内存限制256MB
通过 / 提交0/0
题目描述
Monocarp wrote down two numbers on a whiteboard. Both numbers follow a specific format: a positive integer $x$ with $p$ zeros appended to its end.
Now Monocarp asks you to compare these two numbers. Can you help him?
Now Monocarp asks you to compare these two numbers. Can you help him?
输入格式
The first line contains a single integer $t$ ( $1 \le t \le 10^4$ ) — the number of testcases.
The first line of each testcase contains two integers $x_1$ and $p_1$ ( $1 \le x_1 \le 10^6; 0 \le p_1 \le 10^6$ ) — the description of the first number.
The second line of each testcase contains two integers $x_2$ and $p_2$ ( $1 \le x_2 \le 10^6; 0 \le p_2 \le 10^6$ ) — the description of the second number.
The first line of each testcase contains two integers $x_1$ and $p_1$ ( $1 \le x_1 \le 10^6; 0 \le p_1 \le 10^6$ ) — the description of the first number.
The second line of each testcase contains two integers $x_2$ and $p_2$ ( $1 \le x_2 \le 10^6; 0 \le p_2 \le 10^6$ ) — the description of the second number.
输出格式
For each testcase print the result of the comparison of the given two numbers. If the first number is smaller than the second one, print '<'. If the first number is greater than the second one, print '>'. If they are equal, print '='.
输入输出样例
输入 #1
5 2 1 19 0 10 2 100 1 1999 0 2 3 1 0 1 0 99 0 1 2
输出 #1
> = < = <
The comparisons in the example are: $20 > 19$ , $1000 = 1000$ , $1999 < 2000$ , $1 = 1$ , $99 < 100$ .
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted