Accepted
Code
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a >>b >>c;
if(a%2==0 && b%2==0){
cout<<c;
}
else if(a%2!=0 && b%2!=0){
cout<<c;
}
else if(a%2==0 && c%2==0){
cout<<b;
}
else if(a%2!=0 && c%2!=0){
cout<<b;
}
else if(b%2==0 && c%2==0){
cout<<a;
}
else if(b%2!=0 && c%2!=0){
cout<<a;
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1232 Parity
- Contest
- LUCC Presents Kick & Code Intra LU Programming Contest
- Language
- C++11 (G++ 13.2.0)
- Submit At
- 2025-09-01 05:24:33
- Judged At
- 2025-09-01 05:24:33
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 532.0 KiB