結果

問題 No.227 簡単ポーカー
ユーザー 田村達也田村達也
提出日時 2022-04-22 18:28:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 506 bytes
コンパイル時間 540 ms
コンパイル使用メモリ 10,792 KB
実行使用メモリ 7,980 KB
最終ジャッジ日時 2023-09-06 04:32:49
合計ジャッジ時間 1,163 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,884 KB
testcase_01 AC 17 ms
7,948 KB
testcase_02 AC 17 ms
7,736 KB
testcase_03 AC 17 ms
7,848 KB
testcase_04 AC 16 ms
7,888 KB
testcase_05 AC 16 ms
7,812 KB
testcase_06 AC 16 ms
7,776 KB
testcase_07 AC 15 ms
7,768 KB
testcase_08 AC 16 ms
7,980 KB
testcase_09 AC 15 ms
7,772 KB
testcase_10 AC 16 ms
7,788 KB
testcase_11 AC 16 ms
7,856 KB
testcase_12 AC 15 ms
7,812 KB
testcase_13 AC 16 ms
7,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    a, b, c, d, e = (int(x) for x in input().split( ))
    l = [a, b, c, d, e]
    l.sort()
    n_dic = {}
    for y in l:
        n_dic[y] = l.count(y)

    hand = list(n_dic.values())
    hand.sort()
    if hand == [2,3]:
        print("FULL HOUSE")
    elif hand == [1,1,3]:
        print('THREE CARD')
    elif hand == [1,2,2]:
        print('TWO PAIR')
    elif hand == [1,1,1,2]:
        print('ONE PAIR')
    else:
        print('NO HAND')

if __name__ == "__main__":
    main()
        
0