結果

問題 No.1934 Four Fruits
ユーザー y2noday2noda
提出日時 2022-05-15 18:21:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 20 ms / 2,000 ms
コード長 308 bytes
コンパイル時間 136 ms
コンパイル使用メモリ 10,556 KB
実行使用メモリ 8,660 KB
最終ジャッジ日時 2023-10-11 04:17:28
合計ジャッジ時間 986 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,464 KB
testcase_01 AC 19 ms
8,504 KB
testcase_02 AC 20 ms
8,460 KB
testcase_03 AC 18 ms
8,660 KB
testcase_04 AC 18 ms
8,508 KB
testcase_05 AC 18 ms
8,644 KB
testcase_06 AC 19 ms
8,468 KB
testcase_07 AC 19 ms
8,600 KB
testcase_08 AC 19 ms
8,608 KB
testcase_09 AC 18 ms
8,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

L = list(map(int, input().split()))

L_s = set(L[0:3])

ans = {0, 1, 2, 3}

if(len(L_s) == 3):
    output = list(ans - L_s)[0]
elif(len(L_s) == 2):
    C = Counter(L)
    for k, v in C.items():
        if(v == 1):
            output = k
else:
    output = L[0]

print(output)
0