結果

問題 No.64 XORフィボナッチ数列
ユーザー Maeda
提出日時 2025-09-08 10:19:32
言語 Java
(openjdk 23)
結果
AC  
実行時間 149 ms / 5,000 ms
コード長 446 bytes
コンパイル時間 3,348 ms
コンパイル使用メモリ 76,380 KB
実行使用メモリ 46,580 KB
最終ジャッジ日時 2025-09-08 10:19:39
合計ジャッジ時間 6,530 ms
ジャッジサーバーID
(参考情報)
judge / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long f0_ans = scan.nextLong();
        long f1_ans = scan.nextLong();
        long n = scan.nextLong();
        if(n%3 == 0){
        	System.out.println(f0_ans);
        }else if(n%3 == 1){
        	System.out.println(f1_ans);
        }else{
        	System.out.println(f0_ans ^ f1_ans);
        }
    }
}
0