結果

問題 No.64 XORフィボナッチ数列
ユーザー kohaku_kohaku
提出日時 2016-11-13 23:38:46
言語 Java
(openjdk 23)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 440 bytes
コンパイル時間 2,824 ms
コンパイル使用メモリ 74,696 KB
実行使用メモリ 54,252 KB
最終ジャッジ日時 2024-11-25 22:07:18
合計ジャッジ時間 4,569 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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