/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 1ms 532.0 KiB
#3 Accepted 1ms 496.0 KiB
#4 Accepted 1ms 532.0 KiB

Code


/*
 *  Copyright (c) 2025 Parag Kishor Shornob
 *   All rights reserved.
 */
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<long long > vi;
typedef pair<int,int> pii;

#define yes "YES\n"
#define no "NO\n"
#define pb push_back
#define pop pop_back
#define fastin ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
#define input(v) for(auto &i  : v) cin>>i;
#define all(x) (x).begin(),(x).end()

char ee = '\n';
void printVec(vector<ll> &a){
    for(auto pp : a) cout<<pp <<" " ;
    cout<<ee;
}
ll power(ll base , ll exp){
    ll result=1;
    while(exp>0){
       if(exp%2==1){
        result *=base;
       }
       base  *=base ;
       exp/=2;

    }
    return result;

}

void  solve(){
 ll a, b, c; cin>>a>>b>>c;
 if(a%2==0 ){
    if(b%2 !=0 && c%2 !=0){
        cout<<a<<ee;
    }
 }
if(b%2==0 ){
    if(a%2 !=0 && c%2 !=0){
        cout<<b<<ee;
    }
}
if(c%2==0 ){
    if(a%2 !=0 && b%2 !=0){
        cout<<c<<ee;
    }
 }
 if(a%2!=0 ){
    if(b%2 ==0 && c%2 ==0){
        cout<<a<<ee;
    }
 }
 if(b%2!=0 ){
    if(a%2 ==0 && c%2 ==0){
        cout<<b<<ee;
    }
 }
 if(c%2!=0 ){
    if(a%2 ==0 && b%2 ==0){
        cout<<c<<ee;
    }
 }
}


signed main() {
    fastin;
    ll tt=1 ; //cin>> tt;
    while(tt--) solve();

}

Information

Submit By
Type
Submission
Problem
P1232 Parity
Contest
LUCC Presents Kick & Code Intra LU Programming Contest
Language
C++17 (G++ 13.2.0)
Submit At
2025-09-01 05:26:59
Judged At
2025-09-01 05:26:59
Judged By
Score
100
Total Time
1ms
Peak Memory
532.0 KiB