結果
| 問題 | No.227 簡単ポーカー | 
| コンテスト | |
| ユーザー |  nonokai10 | 
| 提出日時 | 2018-03-02 17:17:52 | 
| 言語 | Ruby (3.4.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 76 ms / 5,000 ms | 
| コード長 | 339 bytes | 
| コンパイル時間 | 226 ms | 
| コンパイル使用メモリ | 7,424 KB | 
| 実行使用メモリ | 12,416 KB | 
| 最終ジャッジ日時 | 2024-06-11 16:31:50 | 
| 合計ジャッジ時間 | 1,700 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 14 | 
コンパイルメッセージ
Syntax OK
ソースコード
hands = gets.split.map(&:to_i)
hash = Hash.new(0)
hands.each do |val|
  hash[val] += 1
end
if hash.values.max == 3
  if hash.values.include?(2)
    puts 'FULL HOUSE'
  else
    puts 'THREE CARD'
  end
elsif hash.values.max == 2
  if hash.values.count(2) == 2
    puts 'TWO PAIR'
  else
    puts 'ONE PAIR'
  end
else
  puts 'NO HAND'
end
            
            
            
        