結果

問題 No.227 簡単ポーカー
ユーザー kutsutamakutsutama
提出日時 2018-12-19 12:55:01
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 62 ms / 5,000 ms
コード長 433 bytes
コンパイル時間 344 ms
コンパイル使用メモリ 11,860 KB
実行使用メモリ 10,048 KB
最終ジャッジ日時 2023-10-25 23:53:43
合計ジャッジ時間 1,581 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
10,048 KB
testcase_01 AC 36 ms
10,048 KB
testcase_02 AC 33 ms
10,048 KB
testcase_03 AC 31 ms
10,048 KB
testcase_04 AC 32 ms
10,048 KB
testcase_05 AC 31 ms
10,048 KB
testcase_06 AC 31 ms
10,048 KB
testcase_07 AC 31 ms
10,048 KB
testcase_08 AC 30 ms
10,048 KB
testcase_09 AC 30 ms
10,048 KB
testcase_10 AC 62 ms
10,048 KB
testcase_11 AC 31 ms
10,048 KB
testcase_12 AC 32 ms
10,048 KB
testcase_13 AC 61 ms
10,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a = [int(x) for x in input().split()]

s = set();
pair = 0
three = 0
for ai in a:
  if ai not in s:
    cnt = 0
    for aj in a:
      if aj == ai:
        cnt += 1
    if cnt == 2:
      pair += 1
    elif cnt == 3:
      three += 1
  s.add(ai)
if pair == 1 and three == 1:
  print('FULL HOUSE')
elif three == 1:
  print('THREE CARD')
elif pair == 2:
  print('TWO PAIR')
elif pair == 1:
  print('ONE PAIR')
else:
  print('NO HAND')
0