結果

問題 No.64 XORフィボナッチ数列
ユーザー 37zigen37zigen
提出日時 2016-04-01 12:12:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 340 bytes
コンパイル時間 2,194 ms
コンパイル使用メモリ 74,000 KB
実行使用メモリ 54,604 KB
最終ジャッジ日時 2024-04-10 07:04:46
合計ジャッジ時間 4,866 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
54,040 KB
testcase_01 AC 131 ms
54,068 KB
testcase_02 AC 131 ms
54,184 KB
testcase_03 AC 130 ms
54,300 KB
testcase_04 AC 131 ms
54,028 KB
testcase_05 AC 131 ms
54,068 KB
testcase_06 AC 131 ms
54,072 KB
testcase_07 AC 130 ms
54,604 KB
testcase_08 AC 135 ms
54,020 KB
testcase_09 AC 132 ms
54,128 KB
testcase_10 AC 129 ms
54,392 KB
testcase_11 AC 130 ms
54,172 KB
testcase_12 AC 132 ms
53,748 KB
testcase_13 AC 134 ms
54,032 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder064;
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		long f0=sc.nextLong();
		long f1=sc.nextLong();
		long n=sc.nextLong();
		//00 0 00
		//01 1 01
		//10 1 10
		//11 0 11
		n=n%3;
		
		System.out.println(new long[]{f0,f1,f0^f1}[(int)n]);
	}
}
0