結果

問題 No.64 XORフィボナッチ数列
ユーザー mits58
提出日時 2016-07-02 00:45:52
言語 Java
(openjdk 23)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 363 bytes
コンパイル時間 2,064 ms
コンパイル使用メモリ 74,272 KB
実行使用メモリ 54,360 KB
最終ジャッジ日時 2024-10-12 01:45:52
合計ジャッジ時間 4,805 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()){
			long f0=sc.nextLong();
			long f1=sc.nextLong();
			long f2=f0^f1;
			long n=sc.nextLong();
			if(n%3==0) System.out.println(f0);
			else if(n%3==1) System.out.println(f1);
			else System.out.println(f2);
		}
	}
}
0