Wrong Answer
Code
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int t = 1;
cin>>t;
while(t--){
int a,c,b;
cin>>a>>b>>c;
int odd = 0,even = 0;
if(a % 2 == 1){
odd++;
}
if(b % 2 == 1){
odd++;
}
if(c % 2 == 1){
odd++;
}
even = 3 - odd;
if( odd == 0){
cout<<a + b + c<<endl;
}
else if(odd == 1 && even == 2){
cout << a + b + c <<endl;
}
else if(odd == 2 && even == 1){
cout << a + b + c - 2 << endl;
}
else {
cout << a + b + c - 3 << endl;
}
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1195 B. Palindrome
- Contest
- Brain Booster #10
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-06-13 16:48:57
- Judged At
- 2025-06-13 16:48:57
- Judged By
- Score
- 0
- Total Time
- 314ms
- Peak Memory
- 1.5 MiB