Skip to content

Commit 27a6d60

Browse files
committed
added codeforces contest solution
1 parent 7ef4ae8 commit 27a6d60

File tree

1 file changed

+32
-0
lines changed
  • Codeforces_Contests/9_Round_667_Div_3

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#include <string>
2+
#include <vector>
3+
4+
#include <algorithm>
5+
#include <cmath>
6+
7+
using namespace std;
8+
9+
int main()
10+
11+
{
12+
int noOfTestCase{};
13+
cin>>noOfTestCase;
14+
long long a[noOfTestCase];
15+
long long b[noOfTestCase];
16+
for(int i=0;i<noOfTestCase;i++){
17+
cin>>a[i];
18+
cin>>b[i];
19+
}
20+
for(int i=0;i<noOfTestCase;i++){
21+
22+
if(abs(a[i]-b[i])==0){
23+
cout<<"0"<<endl;
24+
}else if(abs(a[i]-b[i])%10==0){
25+
cout<<(abs(a[i]-b[i])/10)<<endl;
26+
}else{
27+
cout<<(abs(a[i]-b[i])/10)+1<<endl;
28+
}
29+
}
30+
31+
return 0;
32+
}

0 commit comments

Comments
 (0)