Jogo de par ou ímpar
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 p;
int a, b;
cin >> p >> a >> b;
if((a+b) % 2==1){
cout << 1-p;
}
else{
cout << p;
}
}
Last updated 1 week, 3 days ago