2529.Comparing Two Long Integers

Time Limit: 1s Memory Limit: 256MB

You are given two very long integers a,b (leading zeroes are allowed). You should check what number a or b is greater or determine that they are equal.

The input size is very large so don't use the reading of symbols one by one. Instead of that use the reading of a whole line or token.

As input/output can reach huge size it is recommended to use fast input/output methods: for example, prefer to use scanf/printf instead of cin/cout in C++, prefer to use BufferedReader/PrintWriter instead of Scanner/System.out in Java. Don't use the function input() in Python2 instead of it use the function raw_input().

Input Format(From the terminal/stdin)

The first line contains a non-negative integer a.

The second line contains a non-negative integer b.

The numbers a,b may contain leading zeroes. Each of them contains no more than 106 digits.

Output Format(To the terminal/stdout)

Print the symbol " \lt " if a \lt b and the symbol " \gt " if a \gt b. If the numbers are equal print the symbol "=".

Sample Input 1

Copy
9
10
 \n
  \n

Sample Output 1

Copy
 \lt
·   \n

Sample Input 2

Copy
11
10
  \n
  \n

Sample Output 2

Copy
 \gt
·   \n

Sample Input 3

Copy
00012345
12345
        \n
     \n

Sample Output 3

Copy
=
 \n

Sample Input 4

Copy
0123
9
    \n
 \n

Sample Output 4

Copy
 \gt
·   \n

Sample Input 5

Copy
0123
111
    \n
   \n

Sample Output 5

Copy
 \gt
·   \n

Submit

请先 登录

© 2025 FAQs