結果

問題 No.227 簡単ポーカー
ユーザー code-devocode-devo
提出日時 2016-01-06 05:29:36
言語 Ruby
(3.2.2)
結果
AC  
実行時間 88 ms / 5,000 ms
コード長 228 bytes
コンパイル時間 53 ms
コンパイル使用メモリ 11,972 KB
実行使用メモリ 16,132 KB
最終ジャッジ日時 2023-10-19 15:59:33
合計ジャッジ時間 2,144 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
16,128 KB
testcase_01 AC 86 ms
16,132 KB
testcase_02 AC 88 ms
16,132 KB
testcase_03 AC 85 ms
16,132 KB
testcase_04 AC 87 ms
16,132 KB
testcase_05 AC 88 ms
16,132 KB
testcase_06 AC 85 ms
16,132 KB
testcase_07 AC 86 ms
16,132 KB
testcase_08 AC 85 ms
16,132 KB
testcase_09 AC 86 ms
16,132 KB
testcase_10 AC 86 ms
16,132 KB
testcase_11 AC 83 ms
16,132 KB
testcase_12 AC 87 ms
16,132 KB
testcase_13 AC 86 ms
16,132 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

h = Hash.new{0}

gets.split.each do |s|
  h[s] += 1
end

puts case h.values.sort
when [2, 3] then "FULL HOUSE"
when [1, 1, 3] then "THREE CARD"
when [1, 2, 2] then "TWO PAIR"
when [1, 1, 1, 2] then "ONE PAIR"
else "NO HAND"
end
0