結果

問題 No.1934 Four Fruits
ユーザー lilictaka
提出日時 2022-05-14 13:48:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 425 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 82,592 KB
実行使用メモリ 53,760 KB
最終ジャッジ日時 2024-07-22 22:47:41
合計ジャッジ時間 1,154 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
tmp = list(map(int,input().split()))
cnt = defaultdict(int,default=0)
numbers = set()
for i in tmp:
    numbers.add(i)
    cnt[i] += 1
if len(numbers) == 1:
    print(tmp[0])
elif len(numbers) == 2:
    for i in tmp:
        if cnt[i] == 1:
            print(i)
            exit()
else:
    for i in range(4):
        if i in numbers:
            continue
        print(i)
        exit()

0