/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Accepted 248ms 1.074 MiB
#3 Accepted 291ms 1.359 MiB

Code

#include<bits/stdc++.h>
using namespace std;
int main()
{
   int t;
   cin>>t;
   while(t--)
   {
       long long a,b,c;
       cin>>a>>b>>c;

       long long cnt=0;

       if(a%2!=0)
        cnt++;

       if(b%2!=0)
        cnt++;

       if(c%2!=0)
        cnt++;

       long long sum=a+b+c;

       if(cnt<=1)
        cout<<sum<<endl;
       else if(cnt==2)
       {
           cout<<sum-1<<endl;
       }
       else if(cnt==3)
        cout<<sum-2<<endl;
   }
}

Information

Submit By
Type
Submission
Problem
P1195 B. Palindrome
Contest
Brain Booster #10
Language
C++11 (G++ 13.2.0)
Submit At
2025-06-13 15:41:45
Judged At
2025-06-13 15:41:45
Judged By
Score
100
Total Time
291ms
Peak Memory
1.359 MiB