A. Comparing A Long integers
You are given and very long integers a, b (leading zeroes is allowed). You should check if number a or b is greater or determine this they is equal.
The input size is very large so don ' t use the reading of symbols one by one. Instead of that, the reading of a whole line or token.
As Input/output can reach huge size it is recommended-use fast input/output methods:for example, prefer-to-use SCA Nf/printfinstead 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
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 the them contains no more than6 digits.
Output
Print the symbol "<" if a < b and the symbol ">" if a > b . If The numbers is equal print the symbol "=".
Sample Test (s) input
9
10
Output
<
Input
11
10
Output
>
Input
00012345
12345
Output
=
Input
0123
9
Output
>
Input
0123
111
Output
>
#include <cstdio>#include<cstring>#include<stack>#include<iterator>#include<vector>#include<iostream>#include<map>#include<string>#include<algorithm>using namespaceStd;typedefLong Longll;typedef unsignedLong Longull;Const intmaxn=1e6+5;intMain () {intlen[2]; Chars[2][MAXN]; for(intI=0;i<2; i++) scanf ("%s", S[i]), len[i]=strlen (S[i]); inti,j; for(i=0; i<len[0];i++) if(s[0][i]!='0') Break; for(j=0; j<len[1];j++) if(s[1][j]!='0') Break; if(len[0]-i>len[1]-j) puts (">"); Else if(len[0]-i<len[1]-j) puts ("<"); Else { for(; i<len[0];i++,j++) if(s[0][i]!=s[1][J]) Break; I==len[0]?puts ("="):p UTS (s[0][i]>s[1][J]?">":"<"); } return 0;}
Codeforces 616A comparing Long integers