CF1613A.Long Comparison

入门

通过率:0%

时间限制:2.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Monocarp wrote down two numbers on a whiteboard. Both numbers follow a specific format: a positive integer xx with pp zeros appended to its end.

Now Monocarp asks you to compare these two numbers. Can you help him?

Monocarp 在黑板上写下了两个数。这两个数均遵循特定格式:一个正整数 xx,其末尾附加了 pp 个零。

现在 Monocarp 请你比较这两个数。你能帮他吗?

输入格式

The first line contains a single integer tt (1≤t≤1041 \le t \le 10^4) — the number of testcases.

The first line of each testcase contains two integers x1x_1 and p1p_1 (1≤x1≤106;0≤p1≤1061 \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 x2x_2 and p2p_2 (1≤x2≤106;0≤p2≤1061 \le x_2 \le 10^6; 0 \le p_2 \le 10^6) — the description of the second number.

第一行包含一个整数 tt(1≤t≤1041 \le t \le 10^4)——测试用例的数量。

每个测试用例的第一行包含两个整数 x1x_1 和 p1p_1(1≤x1≤1061 \le x_1 \le 10^6;0≤p1≤1060 \le p_1 \le 10^6)——第一个数的描述。

每个测试用例的第二行包含两个整数 x2x_2 和 p2p_2(1≤x2≤1061 \le x_2 \le 10^6;0≤p2≤1060 \le p_2 \le 10^6)——第二个数的描述。

输出格式

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

    &gt;
    =
    &lt;
    =
    &lt;

说明/提示

The comparisons in the example are: 20>1920 \gt 19, 1000=10001000 = 1000, 1999<20001999 \lt 2000, 1=11 = 1, 99<10099 \lt 100.

示例中的比较如下:20>1920 \gt 19,1000=10001000 = 1000,1999<20001999 \lt 2000,1=11 = 1,99<10099 \lt 100。

输入解题思路,AI测评打分。不知道怎么写?

首页