結果

問題 No.582 キャンディー・ボックス3
ユーザー maimai
提出日時 2017-04-14 02:02:21
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 301 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 11,360 KB
実行使用メモリ 15,332 KB
最終ジャッジ日時 2023-09-27 04:01:13
合計ジャッジ時間 2,598 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
15,276 KB
testcase_01 AC 75 ms
15,148 KB
testcase_02 AC 75 ms
15,300 KB
testcase_03 AC 73 ms
15,036 KB
testcase_04 AC 76 ms
15,224 KB
testcase_05 AC 78 ms
15,160 KB
testcase_06 AC 78 ms
15,036 KB
testcase_07 AC 77 ms
15,128 KB
testcase_08 AC 75 ms
15,272 KB
testcase_09 AC 77 ms
15,180 KB
testcase_10 AC 77 ms
15,132 KB
testcase_11 AC 76 ms
15,288 KB
testcase_12 AC 76 ms
15,128 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.chomp!.to_i
abort unless 1 <=n && n<=10

cstr = gets.chomp!
abort unless cstr =~ /^\d+(?: \d+)*$/
abort unless !gets


c = cstr.split.map(&:to_i)

count = Array.new(4,0)

c.each{|e| count[ [3,e].min ] += 1 }


if count[1].odd? && count[2]<=1 && count[3]==0
    puts 'A'
else
    puts 'B'
end
0