結果

問題 No.1506 Unbalanced Pocky Game
ユーザー simansiman
提出日時 2021-05-16 20:05:44
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 287 bytes
コンパイル時間 219 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 26,624 KB
最終ジャッジ日時 2024-04-15 11:01:16
合計ジャッジ時間 13,074 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
12,032 KB
testcase_01 WA -
testcase_02 AC 106 ms
12,288 KB
testcase_03 AC 116 ms
12,416 KB
testcase_04 AC 162 ms
19,840 KB
testcase_05 AC 174 ms
20,736 KB
testcase_06 AC 148 ms
17,792 KB
testcase_07 AC 143 ms
15,744 KB
testcase_08 AC 151 ms
18,048 KB
testcase_09 AC 187 ms
20,992 KB
testcase_10 AC 184 ms
21,248 KB
testcase_11 AC 146 ms
15,872 KB
testcase_12 AC 137 ms
15,488 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 124 ms
15,232 KB
testcase_16 AC 170 ms
20,992 KB
testcase_17 AC 148 ms
16,896 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 130 ms
15,360 KB
testcase_22 AC 148 ms
18,432 KB
testcase_23 AC 109 ms
12,416 KB
testcase_24 AC 114 ms
12,160 KB
testcase_25 AC 190 ms
25,728 KB
testcase_26 AC 198 ms
24,704 KB
testcase_27 WA -
testcase_28 AC 190 ms
24,320 KB
testcase_29 AC 196 ms
24,704 KB
testcase_30 WA -
testcase_31 AC 192 ms
25,600 KB
testcase_32 AC 193 ms
24,704 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 105 ms
12,288 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 AC 107 ms
12,288 KB
testcase_42 WA -
testcase_43 WA -
testcase_44 AC 108 ms
12,160 KB
testcase_45 AC 115 ms
12,160 KB
testcase_46 AC 146 ms
16,896 KB
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 156 ms
17,280 KB
testcase_50 AC 143 ms
16,896 KB
testcase_51 AC 145 ms
16,896 KB
testcase_52 AC 144 ms
16,384 KB
testcase_53 WA -
testcase_54 WA -
testcase_55 AC 128 ms
13,440 KB
testcase_56 WA -
testcase_57 WA -
testcase_58 AC 116 ms
13,312 KB
testcase_59 AC 117 ms
12,544 KB
testcase_60 WA -
testcase_61 AC 142 ms
16,768 KB
testcase_62 WA -
testcase_63 AC 126 ms
14,592 KB
testcase_64 AC 149 ms
16,896 KB
testcase_65 AC 125 ms
14,848 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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

if A.last != 1
  puts 'Alice'
  exit
end

turn = 0

while A.last == 1
  A.pop
  turn += 1
end

if A.empty?
  if turn % 2 == 0
    puts 'Bob'
  else
    puts 'Alice'
  end
else
  if turn % 2 == 0
    puts 'Alice'
  else
    puts 'Bomb'
  end
end
0