結果

問題 No.64 XORフィボナッチ数列
ユーザー samplelpmassamplelpmas
提出日時 2017-01-19 16:13:39
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 349 bytes
コンパイル時間 1,770 ms
コンパイル使用メモリ 71,516 KB
実行使用メモリ 56,344 KB
最終ジャッジ日時 2023-08-24 17:13:59
合計ジャッジ時間 4,671 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
53,944 KB
testcase_01 AC 120 ms
55,696 KB
testcase_02 AC 121 ms
56,064 KB
testcase_03 AC 119 ms
56,092 KB
testcase_04 AC 120 ms
55,888 KB
testcase_05 AC 119 ms
55,984 KB
testcase_06 AC 118 ms
55,856 KB
testcase_07 AC 119 ms
55,888 KB
testcase_08 AC 119 ms
56,096 KB
testcase_09 RE -
testcase_10 AC 118 ms
56,200 KB
testcase_11 AC 118 ms
55,772 KB
testcase_12 AC 118 ms
55,948 KB
testcase_13 RE -
権限があれば一括ダウンロードができます

ソースコード

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