/ SeriousOJ /

Record Detail

Accepted


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

Code

#include<bits/stdc++.h>
#include <climits>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ui = unsigned int;
const ll INF = 1e17+7;
/*
//      _   __  ___  __   __ _______ _______
//     / | / / / _ \ \ \__\ \\__  __\\  __  \ 
//    /  |/ / / /_\ \ \  ___ \  \ \   \ \ \  \ 
//   / /|  / / ____  \ \ \  \ \ _\ \___\ \/  /
//  /_/ |_/ /_/    \__\ \_\  \_\\______\\___/

ID: mdnahidibnaharun
LANG: C++
TASK: practice 
*/

void solve(){
int a[3];
int o=0,e=0;
for(auto &x:a){
    cin>>x;
    if(x%2==0)e++;
    else o++;
}
if(e==1){
    for(auto x:a){
        if(x%2==0)cout<<x;
    }
}
else{
    for(auto x:a)
    if(x%2!=0)cout<<x;
}
}
    
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    // int t;cin>>t;
    // while(t--){
        solve();
    //     cout<<endl;
    // }
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:36:02
Judged At
2025-09-02 15:38:52
Judged By
Score
100
Total Time
1ms
Peak Memory
536.0 KiB