結果

問題 No.64 XORフィボナッチ数列
ユーザー htensaihtensai
提出日時 2019-12-10 14:52:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 363 bytes
コンパイル時間 2,131 ms
コンパイル使用メモリ 71,212 KB
実行使用メモリ 56,220 KB
最終ジャッジ日時 2023-09-06 07:09:36
合計ジャッジ時間 4,755 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,848 KB
testcase_01 AC 126 ms
55,536 KB
testcase_02 AC 125 ms
55,752 KB
testcase_03 AC 124 ms
56,156 KB
testcase_04 AC 124 ms
55,884 KB
testcase_05 AC 126 ms
55,756 KB
testcase_06 AC 125 ms
56,040 KB
testcase_07 AC 123 ms
55,768 KB
testcase_08 AC 123 ms
56,220 KB
testcase_09 AC 126 ms
56,000 KB
testcase_10 AC 125 ms
55,496 KB
testcase_11 AC 124 ms
55,848 KB
testcase_12 AC 121 ms
55,932 KB
testcase_13 AC 126 ms
56,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long[] value = new long[3];
        value[0] = sc.nextLong();
        value[1] = sc.nextLong();
        value[2] = value[0] ^ value[1];
        long n = sc.nextLong();
        System.out.println(value[(int)(n % 3)]);
    }
}
0