結果

問題 No.64 XORフィボナッチ数列
ユーザー k_kadora
提出日時 2015-05-22 02:20:35
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 348 bytes
コンパイル時間 3,224 ms
コンパイル使用メモリ 74,028 KB
実行使用メモリ 54,260 KB
最終ジャッジ日時 2024-07-06 04:25:16
合計ジャッジ時間 5,104 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 1 RE * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Fib{
	public static void main(String[] arg){
		Scanner sc = new Scanner(System.in);
		long f0,f1,f2,n;
		f0 = sc.nextInt();
		f1 = sc.nextInt();
		n = sc.nextInt();
		f2 = f0^f1;
		if(n%3 == 0){
			System.out.println(f0);
		}else if (n%3 ==1){
			System.out.println(f1);
		}else{
			System.out.println(f2);
		}
	}
}
0