結果
| 問題 |
No.227 簡単ポーカー
|
| コンテスト | |
| ユーザー |
yamagh
|
| 提出日時 | 2015-06-21 19:27:03 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 95 ms / 5,000 ms |
| コード長 | 310 bytes |
| コンパイル時間 | 165 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-07-07 15:55:58 |
| 合計ジャッジ時間 | 2,265 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
コンパイルメッセージ
Syntax OK
ソースコード
A=gets.split.map(&:to_i)
three,one=0,0
A.each{|a|three=A.count(a)==3 ? three+1 : three}
A.each{|a|one =A.count(a)==2 ? one+1 : one}
if three/3==1 && one/2==1
puts "FULL HOUSE"
elsif three/3==1
puts "THREE CARD"
elsif one/2==2
puts "TWO PAIR"
elsif one/2==1
puts "ONE PAIR"
else
puts "NO HAND"
end
yamagh