結果

問題 No.227 簡単ポーカー
ユーザー yamaghyamagh
提出日時 2015-06-21 19:27:03
言語 Ruby
(3.3.0)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 310 bytes
コンパイル時間 443 ms
コンパイル使用メモリ 11,364 KB
実行使用メモリ 15,312 KB
最終ジャッジ日時 2023-09-21 22:50:43
合計ジャッジ時間 2,734 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,052 KB
testcase_01 AC 79 ms
15,124 KB
testcase_02 AC 78 ms
15,176 KB
testcase_03 AC 77 ms
15,224 KB
testcase_04 AC 77 ms
15,044 KB
testcase_05 AC 78 ms
14,988 KB
testcase_06 AC 79 ms
15,108 KB
testcase_07 AC 79 ms
15,128 KB
testcase_08 AC 78 ms
15,204 KB
testcase_09 AC 77 ms
15,312 KB
testcase_10 AC 77 ms
15,116 KB
testcase_11 AC 77 ms
15,176 KB
testcase_12 AC 77 ms
15,256 KB
testcase_13 AC 77 ms
15,224 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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
0