結果

問題 No.64 XORフィボナッチ数列
ユーザー nCk_cvnCk_cv
提出日時 2016-02-01 20:09:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 5,000 ms
コード長 373 bytes
コンパイル時間 2,053 ms
コンパイル使用メモリ 75,292 KB
実行使用メモリ 57,620 KB
最終ジャッジ日時 2023-10-21 18:31:00
合計ジャッジ時間 4,749 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
57,312 KB
testcase_01 AC 115 ms
56,256 KB
testcase_02 AC 125 ms
57,412 KB
testcase_03 AC 129 ms
57,464 KB
testcase_04 AC 126 ms
57,504 KB
testcase_05 AC 125 ms
57,288 KB
testcase_06 AC 128 ms
57,332 KB
testcase_07 AC 129 ms
57,220 KB
testcase_08 AC 127 ms
57,216 KB
testcase_09 AC 130 ms
57,348 KB
testcase_10 AC 129 ms
57,468 KB
testcase_11 AC 130 ms
57,224 KB
testcase_12 AC 129 ms
57,620 KB
testcase_13 AC 129 ms
57,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;
import java.io.*;
 
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();
		if     (n % 3 == 0) System.out.println(f0);
		else if(n % 3 == 1) System.out.println(f1);
		else System.out.println(f0 ^ f1);
	}
}
0