結果

問題 No.227 簡単ポーカー
ユーザー 👑 colognecologne
提出日時 2022-08-29 19:08:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 5,000 ms
コード長 471 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-04-24 09:23:08
合計ジャッジ時間 1,460 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,968 KB
testcase_01 AC 41 ms
52,096 KB
testcase_02 AC 40 ms
51,840 KB
testcase_03 AC 40 ms
51,840 KB
testcase_04 AC 41 ms
51,968 KB
testcase_05 AC 40 ms
51,712 KB
testcase_06 AC 40 ms
51,712 KB
testcase_07 AC 40 ms
51,968 KB
testcase_08 AC 40 ms
52,096 KB
testcase_09 AC 42 ms
52,224 KB
testcase_10 AC 40 ms
51,456 KB
testcase_11 AC 41 ms
51,456 KB
testcase_12 AC 41 ms
51,712 KB
testcase_13 AC 40 ms
51,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    X = {}
    for i in input().split():
        X[i] = X.get(i, 0) + 1

    Z = {}
    Z[0] = Z[1] = Z[2] = Z[3] = Z[4] = Z[5] = 0
    for x, i in X.items():
        Z[i] = Z[i] + 1

    if Z[3] == 1 and Z[2] == 1:
        print('FULL HOUSE')
    elif Z[3] == 1:
        print('THREE CARD')
    elif Z[2] == 2:
        print('TWO PAIR')
    elif Z[2] == 1:
        print('ONE PAIR')
    else:
        print('NO HAND')


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