結果

問題 No.1934 Four Fruits
ユーザー 👑 CleyL
提出日時 2022-05-21 20:00:26
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 14 ms / 2,000 ms
コード長 428 bytes
コンパイル時間 713 ms
コンパイル使用メモリ 76,556 KB
最終ジャッジ日時 2025-01-29 13:10:38
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
    vector<int> A(3);
    for(int i = 0; 3 > i; i++){
        cin>>A[i];
    }
    sort(A.begin(),A.end());
    if(A[0] == A[2]){
        cout << A[0] << endl;
    }else if(A[0] == A[1]){
        cout << A[2] << endl;
    }else if(A[1] == A[2]){
        cout << A[0] << endl;
    }else{
        cout << 6-A[0]-A[1]-A[2] << endl;
    }
}
0