結果

問題 No.227 簡単ポーカー
ユーザー LeonardoneLeonardone
提出日時 2015-10-17 03:02:57
言語 Ruby
(3.3.0)
結果
AC  
実行時間 83 ms / 5,000 ms
コード長 327 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 11,392 KB
実行使用メモリ 15,316 KB
最終ジャッジ日時 2023-09-29 13:28:44
合計ジャッジ時間 2,281 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,212 KB
testcase_01 AC 83 ms
15,268 KB
testcase_02 AC 80 ms
15,156 KB
testcase_03 AC 81 ms
15,316 KB
testcase_04 AC 80 ms
15,244 KB
testcase_05 AC 80 ms
15,148 KB
testcase_06 AC 82 ms
15,288 KB
testcase_07 AC 81 ms
15,140 KB
testcase_08 AC 79 ms
15,272 KB
testcase_09 AC 78 ms
15,044 KB
testcase_10 AC 80 ms
15,236 KB
testcase_11 AC 80 ms
15,116 KB
testcase_12 AC 81 ms
15,204 KB
testcase_13 AC 80 ms
15,112 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#! ruby
# yukicoder My Practice
# author: Leonardone @ NEETSDKASU

A = gets.split.map(&:to_i)

x = [0] * 6

1.upto(13) do |i|
	x[A.count(i)] += 1
end

if x[3] > 0
	if x[2] > 0
		puts 'FULL HOUSE'
	else
		puts 'THREE CARD'
	end
else
	case x[2]
	when 2
		puts 'TWO PAIR'
	when 1
		puts 'ONE PAIR'
	else
		puts 'NO HAND'
	end
end
0