結果

問題 No.227 簡単ポーカー
ユーザー はと
提出日時 2023-07-30 23:29:29
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 30 ms / 5,000 ms
コード長 486 bytes
コンパイル時間 364 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-09 18:25:48
合計ジャッジ時間 1,382 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B,C,D,E = list(map(int,input().split()))
cards = [A,B,C,D,E]
variety_cards = set(cards)
a = cards.count(A)
b = cards.count(B)
c = cards.count(C)
d = cards.count(D)
e = cards.count(E)

if len(variety_cards) == 2:
	if cards.count(A) == 3 or cards.count(A) == 2:
		print("FULL HOUSE")
	else:
		print("NO HAND")
elif len(variety_cards) == 3:
	if max(a,b,c,d,e) == 3:
		print("THREE CARD")
	else:
		print("TWO PAIR")
elif len(variety_cards) == 4:
	print("ONE PAIR")
else:
	print("NO HAND")
0