-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCF_1613_A.cpp
More file actions
64 lines (64 loc) · 1.2 KB
/
CF_1613_A.cpp
File metadata and controls
64 lines (64 loc) · 1.2 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
cin.tie(0);cin.sync_with_stdio(0);
cout.tie(0);cout.sync_with_stdio(0);
int t = 1;
cin >> t;
while (t--)
{
ll a, b;
cin>>a>>b;
ll c, d;
cin>>c>>d;
int num1=a, num2=c;
int size1=0;
int size2=0;
while(num1!=0)
{
num1/=10;
size1++;
}
while(num2!=0)
{
num2/=10;
size2++;
}
ll res1=size1+b;
ll res2=size2+d;
if(res1>res2)
{
cout<<">"<<endl;;
}
else if(res1<res2)
{
cout<<"<"<<endl;
}
else
{
if(size1>size2)
{
c=c*pow(10, size1-size2);
}
else if(size2>size1)
{
a=a*pow(10, size2-size1);
}
if(a>c)
{
cout<<">"<<endl;
}
else if(c>a)
{
cout<<"<"<<endl;
}
else
{
cout<<"="<<endl;
}
}
}
return 0;
}