結果

問題 No.582 キャンディー・ボックス3
ユーザー char134217728char134217728
提出日時 2017-11-20 07:49:26
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 199 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 11,392 KB
実行使用メモリ 15,300 KB
最終ジャッジ日時 2023-08-17 07:45:22
合計ジャッジ時間 3,155 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
15,156 KB
testcase_01 AC 79 ms
15,156 KB
testcase_02 AC 76 ms
15,296 KB
testcase_03 AC 75 ms
15,104 KB
testcase_04 AC 77 ms
15,088 KB
testcase_05 AC 75 ms
15,052 KB
testcase_06 AC 75 ms
15,256 KB
testcase_07 AC 75 ms
15,132 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 76 ms
15,044 KB
testcase_11 AC 76 ms
15,300 KB
testcase_12 AC 76 ms
15,056 KB
testcase_13 AC 76 ms
15,092 KB
testcase_14 AC 76 ms
15,140 KB
testcase_15 AC 77 ms
15,164 KB
testcase_16 WA -
testcase_17 AC 77 ms
15,040 KB
testcase_18 AC 77 ms
15,056 KB
testcase_19 AC 77 ms
15,052 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

gets
c1 = c2 = 0
gets.split.each do |s|
  case s.to_i
  when 1
    c1 += 1
  when 2
    c2 += 1
  else
    puts "B"
    exit
  end
end
if c2 > 1 || (c1 + 2 * c2)%2 == 0
  puts "B"
else
  puts "A"
end
0