結果

問題 No.227 簡単ポーカー
ユーザー MaxMellonMaxMellon
提出日時 2015-08-12 23:49:16
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 317 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 11,368 KB
実行使用メモリ 15,372 KB
最終ジャッジ日時 2023-09-25 08:32:54
合計ジャッジ時間 2,233 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 83 ms
15,028 KB
testcase_02 AC 82 ms
15,260 KB
testcase_03 AC 82 ms
15,156 KB
testcase_04 AC 80 ms
15,184 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 80 ms
15,080 KB
testcase_08 WA -
testcase_09 AC 78 ms
15,260 KB
testcase_10 AC 80 ms
15,316 KB
testcase_11 AC 80 ms
15,084 KB
testcase_12 AC 79 ms
15,076 KB
testcase_13 AC 79 ms
15,356 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

arr = gets.chomp.split.map(&:to_i).group_by { |e| e }.values.sort_by { |e| e.length }
puts 'NO PAIR'  if arr.length == 5 || arr.length == 1
puts 'ONE PAIR' if arr.length == 4
if arr.length == 3
  puts 'TWO PAIR'  if arr[2].length == 2
  puts 'THREE CARD' if arr[2].length == 3
end
puts 'FULL HOUSE'if arr.length == 2
0