結果

問題 No.64 XORフィボナッチ数列
ユーザー Mcpu3
提出日時 2018-09-29 16:08:04
言語 Java
(openjdk 23)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 377 bytes
コンパイル時間 2,240 ms
コンパイル使用メモリ 74,644 KB
実行使用メモリ 41,520 KB
最終ジャッジ日時 2024-10-12 08:15:42
合計ジャッジ時間 4,331 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long F0 = sc.nextLong(), F1 = sc.nextLong(), N = sc.nextLong();
        sc.close();
        if (N % 3 == 0) System.out.print(F0);
        else if (N % 3 == 1) System.out.print(F1);
        else System.out.print(F0 ^ F1);
    }
}
0