結果

問題 No.64 XORフィボナッチ数列
ユーザー t8m8⛄️t8m8⛄️
提出日時 2015-04-03 03:14:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 5,000 ms
コード長 830 bytes
コンパイル時間 3,213 ms
コンパイル使用メモリ 73,480 KB
実行使用メモリ 56,476 KB
最終ジャッジ日時 2023-09-17 03:52:25
合計ジャッジ時間 5,759 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
56,476 KB
testcase_01 AC 122 ms
55,508 KB
testcase_02 AC 124 ms
55,980 KB
testcase_03 AC 122 ms
55,856 KB
testcase_04 AC 121 ms
55,392 KB
testcase_05 AC 126 ms
56,040 KB
testcase_06 AC 120 ms
55,736 KB
testcase_07 AC 121 ms
56,192 KB
testcase_08 AC 125 ms
55,588 KB
testcase_09 AC 124 ms
56,036 KB
testcase_10 AC 125 ms
56,084 KB
testcase_11 AC 123 ms
55,832 KB
testcase_12 AC 122 ms
56,052 KB
testcase_13 AC 123 ms
55,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//No.64 XORフィボナッチ数列

import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.lang.Math.*;

public class No64 {
    
    static final Scanner sc = new Scanner(System.in);
    static final PrintWriter out = new PrintWriter(System.out,false);

    static void solve() {
        long[] f = new long[3];
        f[0] = sc.nextLong();
        f[1] = sc.nextLong();
        long n = sc.nextLong();
        f[2] = f[0]^f[1];
        out.println(f[(int)(n%3)]);
    }

    public static void main(String[] args) {
        long start = System.currentTimeMillis();

        solve();
        out.flush();

        long end = System.currentTimeMillis();
        //trace(end-start + "ms");
        sc.close();
    }

    static void trace(Object... o) { System.out.println(deepToString(o));}
}
0