/ SeriousOJ /

Record Detail

Accepted


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

Code

#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
#define ld long double
#define ull unsigned long long
#define lcm(a,b) ((a*b)/__gcd(a,b))
#define debug(x) cout << "Debug : " << x << endl;
const double PI = 2 * acos(0.0);
const int MOD = 1000000007;

void solve(){
    ll a, b, c;
    cin >> a >> b >> c;

    if (a % 2 == b % 2){
        cout << c << endl;
    }
    else if (a % 2 == c % 2){
        cout << b << endl;
    }
    else{
        cout << a << endl;
    }
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);

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