結果

問題 No.227 簡単ポーカー
ユーザー hiroga
提出日時 2017-12-29 07:13:36
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 35 ms / 5,000 ms
コード長 362 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-12-21 10:00:37
合計ジャッジ時間 1,284 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
	cards = input().split()
	cards.sort()

	hands = []
	for card in set(cards):
		hands.append(cards.count(card))
	hands.sort(reverse=True)
	
	if hands == [3,2]:
		print("FULL HOUSE")
	elif hands == [3,1,1]:
		print("THREE CARD")
	elif hands == [2,2,1]:
		print("TWO PAIR")
	elif hands == [2,1,1,1]:
		print("ONE PAIR")
	else:
		print("NO HAND")

main()
0