結果

問題 No.1934 Four Fruits
ユーザー june19312
提出日時 2022-05-14 10:19:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 375 bytes
コンパイル時間 941 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 52,096 KB
最終ジャッジ日時 2024-07-22 18:36:21
合計ジャッジ時間 1,413 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

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

dict = {}
tmp = [0]*4

for i,v in enumerate(a):
    if v not in dict:
        dict[v] = 1
    else:
        dict[v]+=1

    tmp[v]+=1

if len(dict) == 1:
    print(a[0])
elif len(dict) == 2:
    for i,v in enumerate(tmp):
        if v == 1:
            print(i)
else:
    for i,v in enumerate(tmp):
        if v == 0:
            print(i)
0