結果

問題 No.227 簡単ポーカー
ユーザー hirogahiroga
提出日時 2017-12-29 06:56:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 384 bytes
コンパイル時間 136 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 7,896 KB
最終ジャッジ日時 2023-08-23 08:29:59
合計ジャッジ時間 1,238 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

	hands = [1]
	for i in range(4):
		if cards[i] == cards[i+1]:
			hands[-1]+=1
		else:
			hands.append(1)
	hands.sort()
	
	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