結果

問題 No.1934 Four Fruits
ユーザー june19312june19312
提出日時 2022-05-14 10:19:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 375 bytes
コンパイル時間 2,077 ms
コンパイル使用メモリ 86,876 KB
実行使用メモリ 71,552 KB
最終ジャッジ日時 2023-09-30 00:38:24
合計ジャッジ時間 1,752 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,176 KB
testcase_01 AC 71 ms
71,400 KB
testcase_02 AC 72 ms
71,308 KB
testcase_03 AC 70 ms
71,372 KB
testcase_04 AC 72 ms
71,108 KB
testcase_05 AC 72 ms
71,264 KB
testcase_06 AC 70 ms
71,456 KB
testcase_07 AC 69 ms
71,552 KB
testcase_08 AC 72 ms
71,480 KB
testcase_09 AC 70 ms
71,156 KB
権限があれば一括ダウンロードができます

ソースコード

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