結果

問題 No.64 XORフィボナッチ数列
コンテスト
ユーザー t8m8⛄️
提出日時 2015-04-03 03:14:57
言語 Java
(openjdk 27 + ACL)
コンパイル:
javac -J-Duser.language=en -encoding UTF8 -cp /opt/aclib/ac_library.jar _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true -cp .:/opt/aclib/ac_library.jar _class_
結果
AC  
実行時間 56 ms / 5,000 ms
+ 765µs
コード長 830 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,543 ms
コンパイル使用メモリ 86,148 KB
実行使用メモリ 45,348 KB
最終ジャッジ日時 2026-10-11 10:15:18
合計ジャッジ時間 4,518 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

//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