結果

問題 No.1506 Unbalanced Pocky Game
ユーザー ripityripity
提出日時 2021-12-13 21:02:31
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 526 bytes
コンパイル時間 6,438 ms
コンパイル使用メモリ 70,584 KB
実行使用メモリ 64,996 KB
最終ジャッジ日時 2023-09-30 02:23:46
合計ジャッジ時間 37,760 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,692 KB
testcase_01 AC 120 ms
56,256 KB
testcase_02 AC 120 ms
55,976 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 301 ms
60,068 KB
testcase_14 AC 371 ms
60,416 KB
testcase_15 AC 376 ms
60,304 KB
testcase_16 AC 497 ms
64,480 KB
testcase_17 AC 399 ms
60,236 KB
testcase_18 AC 347 ms
60,144 KB
testcase_19 AC 304 ms
60,104 KB
testcase_20 AC 498 ms
61,324 KB
testcase_21 AC 373 ms
60,308 KB
testcase_22 AC 410 ms
60,380 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 565 ms
64,304 KB
testcase_26 AC 663 ms
64,760 KB
testcase_27 AC 636 ms
64,468 KB
testcase_28 AC 623 ms
64,996 KB
testcase_29 AC 628 ms
64,656 KB
testcase_30 AC 670 ms
64,676 KB
testcase_31 AC 640 ms
64,368 KB
testcase_32 AC 631 ms
64,964 KB
testcase_33 AC 634 ms
64,620 KB
testcase_34 AC 625 ms
64,444 KB
testcase_35 AC 645 ms
64,692 KB
testcase_36 AC 136 ms
55,524 KB
testcase_37 AC 173 ms
56,640 KB
testcase_38 AC 142 ms
55,812 KB
testcase_39 AC 135 ms
55,812 KB
testcase_40 AC 130 ms
54,016 KB
testcase_41 AC 158 ms
56,148 KB
testcase_42 AC 138 ms
55,792 KB
testcase_43 AC 158 ms
55,712 KB
testcase_44 AC 137 ms
55,800 KB
testcase_45 AC 129 ms
55,940 KB
testcase_46 AC 440 ms
60,232 KB
testcase_47 AC 306 ms
60,372 KB
testcase_48 AC 337 ms
60,368 KB
testcase_49 AC 460 ms
60,428 KB
testcase_50 AC 461 ms
60,716 KB
testcase_51 AC 469 ms
60,272 KB
testcase_52 AC 412 ms
60,616 KB
testcase_53 AC 507 ms
60,476 KB
testcase_54 AC 344 ms
60,040 KB
testcase_55 AC 317 ms
60,704 KB
testcase_56 AC 309 ms
60,224 KB
testcase_57 AC 439 ms
60,456 KB
testcase_58 AC 311 ms
60,200 KB
testcase_59 AC 272 ms
60,420 KB
testcase_60 AC 360 ms
60,268 KB
testcase_61 AC 414 ms
60,056 KB
testcase_62 AC 403 ms
60,120 KB
testcase_63 AC 372 ms
60,388 KB
testcase_64 AC 445 ms
60,252 KB
testcase_65 AC 399 ms
60,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    
    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] A = new int[N];
        String[] ans = {"Bob","Alice"};
        for( int i = 0; i < N; i++ ) {
            A[i] = sc.nextInt();
        }
        
        for( int i = N-1; i >= 0; i-- ) {
            if( A[i] != 1 ) {
                System.out.println(ans[(N-i)%2]);
                break;
            }
        }
        
    }
    
}
0