309021: CF1613A. Long Comparison

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Long Comparison

题意翻译

**【题目描述】** Monocarp 在一个黑板上写下了两个数。每一个数都用两个整数 $x,p$ 表示,表示其值为 $x$ 后有 $p$ 个 $0$。Monocarp 想让你比较这两个数的大小。 **【输入格式】** 第一行一个整数 $t$($1\leq t\leq {10}^{4}$),表示数据的组数。 对于每组数据,有以下两行输入。 第一行两个整数 $x_{1},p_{1}$($1\leq x_{1}\leq 10^{6}$,$0\leq p_{1}\leq 10^{6}$),表示第一个数。 第二行两个整数 $x_{2},p_{2}$($1\leq x_{2}\leq 10^{6}$,$0\leq p_{2}\leq 10^{6}$),表示第二个数。 **【输出格式】** 对于每组数据,若第一个数大于第二个数,输出 `>`;若第一个数等于第二个数,输出 `=`;若第一个数小于第二个数,输出 `<`。 **【样例说明】** 样例中的五组数分别为 $20\gt 19,1000=1000,1999\lt 2000,1=1,99\lt 100$。 By @[雨伞CKY](/user/415445)

题目描述

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?

输入输出格式

输入格式


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.

输出格式


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 '&lt;'. If the first number is greater than the second one, print '&gt;'. 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

&gt;
=
&lt;
=
&lt;

说明

The comparisons in the example are: $ 20 > 19 $ , $ 1000 = 1000 $ , $ 1999 < 2000 $ , $ 1 = 1 $ , $ 99 < 100 $ .

Input

题意翻译

**【题目描述】** Monocarp 在一个黑板上写下了两个数。每一个数都用两个整数 $x,p$ 表示,表示其值为 $x$ 后有 $p$ 个 $0$。Monocarp 想让你比较这两个数的大小。 **【输入格式】** 第一行一个整数 $t$($1\leq t\leq {10}^{4}$),表示数据的组数。 对于每组数据,有以下两行输入。 第一行两个整数 $x_{1},p_{1}$($1\leq x_{1}\leq 10^{6}$,$0\leq p_{1}\leq 10^{6}$),表示第一个数。 第二行两个整数 $x_{2},p_{2}$($1\leq x_{2}\leq 10^{6}$,$0\leq p_{2}\leq 10^{6}$),表示第二个数。 **【输出格式】** 对于每组数据,若第一个数大于第二个数,输出 `>`;若第一个数等于第二个数,输出 `=`;若第一个数小于第二个数,输出 `<`。 **【样例说明】** 样例中的五组数分别为 $20\gt 19,1000=1000,1999\lt 2000,1=1,99\lt 100$。 By @[雨伞CKY](/user/415445)

加入题单

算法标签: