結果

問題 No.64 XORフィボナッチ数列
ユーザー mits58mits58
提出日時 2016-07-02 00:45:52
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 363 bytes
コンパイル時間 2,282 ms
コンパイル使用メモリ 74,604 KB
実行使用メモリ 54,276 KB
最終ジャッジ日時 2024-04-20 06:38:06
合計ジャッジ時間 4,923 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
54,116 KB
testcase_01 AC 132 ms
54,176 KB
testcase_02 AC 133 ms
53,956 KB
testcase_03 AC 134 ms
54,276 KB
testcase_04 AC 130 ms
54,048 KB
testcase_05 AC 131 ms
54,096 KB
testcase_06 AC 132 ms
54,112 KB
testcase_07 AC 130 ms
54,048 KB
testcase_08 AC 131 ms
54,124 KB
testcase_09 AC 130 ms
53,980 KB
testcase_10 AC 130 ms
54,176 KB
testcase_11 AC 130 ms
54,184 KB
testcase_12 AC 132 ms
53,956 KB
testcase_13 AC 131 ms
54,132 KB
権限があれば一括ダウンロードができます

ソースコード

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