-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1409.cpp
More file actions
38 lines (38 loc) · 693 Bytes
/
1409.cpp
File metadata and controls
38 lines (38 loc) · 693 Bytes
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
//A. Yet Another Two Integers Problem
#include <iostream>
using namespace std;
int main()
{
int t, a, b;
cin>>t;
while(t--)
{
cin>>a>>b;
cout<<(abs(a-b)+9)/10<<endl;
/* int counter=0;
if(a>b)
{
counter=(a-b)/10;
if(a%10==0)
{
cout<<counter<<endl;
}
else
cout<<counter+1<<endl;
}
else if(a<b)
{
counter=(b-a)/10;
if(a%10==0)
{
cout<<counter<<endl;
}
else
cout<<counter+1<<endl;
}
else{
cout<<0<<endl;
}
*/
}
}