結果
| 問題 | No.227 簡単ポーカー |
| コンテスト | |
| ユーザー |
harhogefoo
|
| 提出日時 | 2016-10-13 07:51:41 |
| 言語 | Ruby (4.0.7 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 53 ms / 5,000 ms |
| + 884µs | |
| コード長 | 425 bytes |
| 記録 | |
| コンパイル時間 | 9 ms |
| コンパイル使用メモリ | 9,872 KB |
| 実行使用メモリ | 14,592 KB |
| 最終ジャッジ日時 | 2026-10-11 03:07:08 |
| 合計ジャッジ時間 | 2,141 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
コンパイルメッセージ
Syntax OK
ソースコード
a = gets.chomp.split(" ")
h = Hash.new(0)
a.each do |card|
h[card] += 1
end
three_card = false
two_pair_count = 0
h.each do |card, count|
three_card = true if count == 3
two_pair_count += 1 if count == 2
end
if three_card and two_pair_count == 1
puts "FULL HOUSE"
elsif three_card
puts "THREE CARD"
elsif two_pair_count == 2
puts "TWO PAIR"
elsif two_pair_count == 1
puts "ONE PAIR"
else
puts "NO HAND"
end
harhogefoo