/ SeriousOJ /

Record Detail

Accepted


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

Code

#include <bits/stdc++.h>     //   All praise is due to Allah alone, and peace and blessings be
using namespace std;         //         upon him, after whom there is no other Prophet.

int32_t main() {
    cin.tie(0)->sync_with_stdio(false);

    int32_t Case = 1;    //cin >> Case;
    for (int T = 1; T <= Case; T++) {

        int a, b, c; cin >> a >> b >> c;

        function<void()> Test_Case = [&]() {
            if(a & 1) {
                if(b & 1) cout << c;
                else if(c & 1) cout << b;
                else cout << a;
            }
            else if(b & 1) {
                if(a & 1) cout << c;
                else if(c & 1) cout << a;
                else cout << b;
            }
            else  {
                if(a & 1) cout << b;
                else if(b & 1) cout << a;
                else cout << c;
            }
        };
        Test_Case();
    }
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1232 Parity
Contest
LUCC Presents Intra LU Junior Programming Contest - Replay
Language
C++17 (G++ 13.2.0)
Submit At
2025-09-02 15:33:24
Judged At
2025-09-02 15:33:24
Judged By
Score
100
Total Time
1ms
Peak Memory
536.0 KiB