Piloto Automático
Problem LinkSolution by Mr.Olimpia — 100 pts
Code / Notes
#include <bits/stdc++.h>
using namespace std;
/*int dig(int N) {
int ans = 1;
while (N > 10) {
N /= 10;
ans++;
}
return ans;
}*/
int main() {
int A;
int B;
int C;
cin >> A >> B >> C;
if((B-A)<(C-B)){
cout << 1;
}
else if((B-A)>(C-B)){
cout << -1;
}
else{
cout << 0;
}
}
Last updated 2 weeks, 3 days ago