結果

問題 No.1569 Nixoracci's Number
ユーザー ripityripity
提出日時 2021-12-13 21:36:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 152 ms / 2,000 ms
コード長 450 bytes
コンパイル時間 1,994 ms
コンパイル使用メモリ 71,632 KB
実行使用メモリ 57,796 KB
最終ジャッジ日時 2023-09-30 03:04:10
合計ジャッジ時間 6,490 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,452 KB
testcase_01 AC 127 ms
55,548 KB
testcase_02 AC 126 ms
55,784 KB
testcase_03 AC 127 ms
55,916 KB
testcase_04 AC 151 ms
55,976 KB
testcase_05 AC 136 ms
56,404 KB
testcase_06 AC 152 ms
56,004 KB
testcase_07 AC 131 ms
55,780 KB
testcase_08 AC 136 ms
55,916 KB
testcase_09 AC 132 ms
55,700 KB
testcase_10 AC 135 ms
56,196 KB
testcase_11 AC 137 ms
56,028 KB
testcase_12 AC 151 ms
55,516 KB
testcase_13 AC 150 ms
56,124 KB
testcase_14 AC 136 ms
57,796 KB
testcase_15 AC 149 ms
55,760 KB
testcase_16 AC 137 ms
55,664 KB
testcase_17 AC 133 ms
55,784 KB
testcase_18 AC 140 ms
56,004 KB
testcase_19 AC 136 ms
55,916 KB
testcase_20 AC 152 ms
56,028 KB
testcase_21 AC 149 ms
55,732 KB
testcase_22 AC 135 ms
56,008 KB
testcase_23 AC 150 ms
55,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    
    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        long K = sc.nextLong();
        long[] A = new long[N+1];
        for( int i = 0; i < N; i++ ) {
            A[i] = sc.nextLong();
            A[N] ^= A[i];
        }
        
        int k = (int)((K-1)%(N+1));
        System.out.println(A[k]);
        
    }
    
}
0