結果
| 問題 | No.227 簡単ポーカー |
| コンテスト | |
| ユーザー |
tonq__
|
| 提出日時 | 2022-02-03 18:22:12 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 640 bytes |
| コンパイル時間 | 81 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-11 09:58:59 |
| 合計ジャッジ時間 | 1,031 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 6 |
ソースコード
def full_house(cnt):
return cnt[0] == 3 and cnt[1] == 2
def three_card(cnt):
return cnt[0] == 3
def two_pair(cnt):
return cnt[0] == 2 and cnt[1] == 2
def one_pair(cnt):
return cnt[0] == 2
def main():
a = (int(x) for x in input().split())
cnt = [0] * 13
for e in a:
cnt[e-1] += 1
cnt.sort(reverse=True)
if full_house(cnt):
print("FULL HOUSE")
elif three_card(cnt):
print("THREE CARD")
elif two_pair(cnt):
print("TWO CARD")
elif one_pair(cnt):
print("ONE CARD")
else:
print("NO HAND")
if __name__ == '__main__':
main()
tonq__