/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 536.0 KiB
#2 Accepted 1ms 324.0 KiB
#3 Accepted 1ms 532.0 KiB
#4 Accepted 1ms 480.0 KiB

Code

/*
    Author: abdmahdi56
*/
#include <bits/stdc++.h>
#define endl '\n'
#define yes cout << "YES\n"
#define no cout << "NO\n"
#define ll long long
#define vi vector<ll>
#define all(v) v.begin(), v.end()
#define loop(n) for(int i = 0; i < (n); i++)

using namespace std;

void Bismillah() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
}

void solve() {
       int a[3];
       vi e;
       vi o;
       for(int i=0;i<3;i++){
        cin>>a[i];
        if(a[i]%2==0){
            e.push_back(i);
        }else{
            o.push_back(i);
        }
       }

       if(e.size()==1){
           int it=e[0];
        cout<<a[it];
       }else{
           int it=o[0];
           cout<<a[it];
       }





}
int main() {
    Bismillah();
    int t=1;
    //cin >> t=1;
    while (t--) {
        solve();
    }
    return 0;
}

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:25:47
Judged At
2025-09-01 05:25:47
Judged By
Score
100
Total Time
1ms
Peak Memory
536.0 KiB