-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA1613_CF.java
More file actions
47 lines (41 loc) · 1.24 KB
/
Copy pathA1613_CF.java
File metadata and controls
47 lines (41 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import java.util.Scanner;
public class A1613_CF {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int t = scn.nextInt();
while (t-- > 0) {
String x=scn.next();
int p1=scn.nextInt();
String y=scn.next();
int p2=scn.nextInt();
long len1=x.length()+p1;
long len2=y.length()+p2;
if(len1>len2){
System.out.println(">");
}else if(len1<len2){
System.out.println("<");
}else{
int x1=Integer.parseInt(x);
int y1=Integer.parseInt(y);
int l1=x.length();
int l2=y.length();
while(l1!=l2){
if(l1<l2){
x1*=10;
l1++;
}else{
y1*=10;
l2++;
}
}
if(x1>y1){
System.out.println(">");
}else if(x1<y1){
System.out.println("<");
}else{
System.out.println("=");
}
}
}
}
}