結果

問題 No.227 簡単ポーカー
ユーザー yocto_sothothyocto_sothoth
提出日時 2020-10-05 20:35:27
言語 Ruby
(3.3.0)
結果
AC  
実行時間 81 ms / 5,000 ms
コード長 252 bytes
コンパイル時間 706 ms
コンパイル使用メモリ 11,216 KB
実行使用メモリ 15,364 KB
最終ジャッジ日時 2023-09-27 04:25:39
合計ジャッジ時間 3,268 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,144 KB
testcase_01 AC 79 ms
15,364 KB
testcase_02 AC 80 ms
15,132 KB
testcase_03 AC 81 ms
15,160 KB
testcase_04 AC 81 ms
15,160 KB
testcase_05 AC 79 ms
15,096 KB
testcase_06 AC 81 ms
15,288 KB
testcase_07 AC 80 ms
15,296 KB
testcase_08 AC 81 ms
15,088 KB
testcase_09 AC 79 ms
15,096 KB
testcase_10 AC 80 ms
15,156 KB
testcase_11 AC 81 ms
15,164 KB
testcase_12 AC 80 ms
15,240 KB
testcase_13 AC 80 ms
15,312 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a = gets.split.map(&:to_i).tally
max = a.values.max
size = a.size

if max == 3 && size == 2
  puts 'FULL HOUSE'
elsif max == 3
  puts 'THREE CARD'
elsif max == 2 && size == 3
  puts 'TWO PAIR'
elsif max == 2
  puts 'ONE PAIR'
else
  puts 'NO HAND'
end
0