結果

問題 No.64 XORフィボナッチ数列
ユーザー samplelpmassamplelpmas
提出日時 2017-01-19 16:17:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 351 bytes
コンパイル時間 1,958 ms
コンパイル使用メモリ 71,280 KB
実行使用メモリ 56,440 KB
最終ジャッジ日時 2023-08-24 17:14:04
合計ジャッジ時間 4,343 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
56,056 KB
testcase_01 AC 118 ms
56,308 KB
testcase_02 AC 118 ms
55,996 KB
testcase_03 AC 120 ms
56,256 KB
testcase_04 AC 118 ms
56,112 KB
testcase_05 AC 122 ms
56,236 KB
testcase_06 AC 120 ms
55,780 KB
testcase_07 AC 118 ms
55,916 KB
testcase_08 AC 117 ms
56,076 KB
testcase_09 AC 117 ms
55,940 KB
testcase_10 AC 123 ms
55,708 KB
testcase_11 AC 121 ms
56,084 KB
testcase_12 AC 118 ms
56,440 KB
testcase_13 AC 119 ms
56,076 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        long[] f = new long[3];

        f[0] = sc.nextLong();
        f[1] = sc.nextLong();
        f[2] = f[0] ^ f[1];

        long n = sc.nextLong();

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

    }

}
0