結果

問題 No.64 XORフィボナッチ数列
ユーザー spaciaspacia
提出日時 2015-12-29 16:59:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 54 ms / 5,000 ms
コード長 507 bytes
コンパイル時間 2,032 ms
コンパイル使用メモリ 74,604 KB
実行使用メモリ 53,580 KB
最終ジャッジ日時 2023-10-19 12:21:47
合計ジャッジ時間 3,682 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
53,580 KB
testcase_01 AC 51 ms
52,460 KB
testcase_02 AC 52 ms
53,580 KB
testcase_03 AC 53 ms
53,564 KB
testcase_04 AC 50 ms
52,504 KB
testcase_05 AC 53 ms
53,576 KB
testcase_06 AC 52 ms
53,572 KB
testcase_07 AC 52 ms
52,440 KB
testcase_08 AC 51 ms
53,568 KB
testcase_09 AC 50 ms
53,580 KB
testcase_10 AC 50 ms
52,444 KB
testcase_11 AC 50 ms
52,448 KB
testcase_12 AC 50 ms
53,572 KB
testcase_13 AC 54 ms
53,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;
import java.math.*;

class Main64 {
	
	public static void out (Object out) {
		System.out.println(out);
	}
	
	public static void main (String[] args) throws IOException {
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		String[] line = br.readLine().split(" ");
		long f0 = Long.parseLong(line[0]);
		long f1 = Long.parseLong(line[1]);
		long n  = Long.parseLong(line[2]);
		
		out(n % 3 == 0 ? f0 : n % 3 == 1 ? f1 : f0^f1);
		
	}
}
0