結果

問題 No.64 XORフィボナッチ数列
ユーザー matsuyoshi30matsuyoshi30
提出日時 2017-02-20 22:50:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 438 bytes
コンパイル時間 2,121 ms
コンパイル使用メモリ 72,036 KB
実行使用メモリ 56,164 KB
最終ジャッジ日時 2023-08-28 21:53:48
合計ジャッジ時間 4,662 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,452 KB
testcase_01 AC 123 ms
55,504 KB
testcase_02 AC 122 ms
55,708 KB
testcase_03 AC 126 ms
56,056 KB
testcase_04 AC 124 ms
55,996 KB
testcase_05 AC 123 ms
56,164 KB
testcase_06 AC 126 ms
55,792 KB
testcase_07 AC 128 ms
55,980 KB
testcase_08 AC 127 ms
55,968 KB
testcase_09 AC 128 ms
55,952 KB
testcase_10 AC 126 ms
56,136 KB
testcase_11 AC 129 ms
55,928 KB
testcase_12 AC 125 ms
56,024 KB
testcase_13 AC 127 ms
55,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long[] f = new long[3];
        f[0] = in.nextLong();
        f[1] = in.nextLong();
        f[2] = f[0] ^ f[1];

        long n = in.nextLong();

        System.out.println(f[(int)(n%3)]);

        in.close();
    }
}
0