結果

問題 No.1934 Four Fruits
ユーザー 👑 KazunKazun
提出日時 2022-05-13 21:22:49
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 387 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 87,200 KB
実行使用メモリ 71,432 KB
最終ジャッジ日時 2023-09-29 06:19:56
合計ジャッジ時間 1,736 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
70,792 KB
testcase_01 AC 73 ms
70,700 KB
testcase_02 AC 74 ms
70,620 KB
testcase_03 WA -
testcase_04 AC 74 ms
70,860 KB
testcase_05 AC 72 ms
70,728 KB
testcase_06 AC 74 ms
70,620 KB
testcase_07 AC 74 ms
70,816 KB
testcase_08 AC 72 ms
70,832 KB
testcase_09 AC 74 ms
70,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(a,b,c):
    X=[a,b,c]

    # 4 of a kind
    for k in range(4):
        if X.count(k)==3:
            return k

    # 2 pair
    for i in range(4):
        for j in range(4):
            if X.count(i)==2 and X.count(j):
                return j

    # high card
    for i in range(4):
        if X.count(i)==0:
            return i

a,b,c=map(int,input().split())

print(f(a,b,c))
0