Accepted
Code
#include<bits/stdc++.h>
#define ll long long
#define int long long
using namespace std;
void solve()
{
int a,b,c;cin>>a>>b>>c;
int ans=0;
if(a%2==0) ans+=a;
else ans+=a-1;
if(b%2==0) ans+=b;
else ans+=b-1;
if(c%2==0) ans+=c;
else ans+=c-1;
if(a%2 || b%2 || c%2) ans++;
cout<<ans<<endl;
}
main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
ll t=1;cin>>t;
while(t--)
{
solve();
}
return 0;
}
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 15:40:04
- Judged At
- 2025-06-13 15:40:04
- Judged By
- Score
- 100
- Total Time
- 107ms
- Peak Memory
- 1.586 MiB