Code
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--){
int a,b,c;
cin>>a>>b>>c;
int k=2;
if(a==b && b==c){
cout<<"0"<<endl;
}
else{
int x=c-a;
int y=c-b;
if(x==y){
cout<< 1<<endl;
}
else{
cout<<2<<endl;
}
}
}
}
Information
- Submit By
- Type
- Pretest
- Problem
- P1061 Bring equality
- Language
- C++20 (G++ 13.2.0)
- Submit At
- 2024-07-14 15:55:05
- Judged At
- 2024-07-14 15:55:05
- Judged By
- Score
- 10
- Total Time
- 2ms
- Peak Memory
- 332.0 KiB