結果

問題 No.64 XORフィボナッチ数列
ユーザー ぴろずぴろず
提出日時 2014-12-12 09:42:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 328 bytes
コンパイル時間 4,897 ms
コンパイル使用メモリ 71,408 KB
実行使用メモリ 55,796 KB
最終ジャッジ日時 2023-09-02 14:19:36
合計ジャッジ時間 5,160 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,292 KB
testcase_01 AC 123 ms
55,272 KB
testcase_02 AC 122 ms
55,336 KB
testcase_03 AC 122 ms
55,472 KB
testcase_04 AC 125 ms
55,284 KB
testcase_05 AC 126 ms
55,796 KB
testcase_06 AC 122 ms
55,652 KB
testcase_07 AC 126 ms
55,556 KB
testcase_08 AC 124 ms
55,636 KB
testcase_09 AC 126 ms
55,624 KB
testcase_10 AC 134 ms
55,600 KB
testcase_11 AC 124 ms
55,488 KB
testcase_12 AC 129 ms
55,712 KB
testcase_13 AC 129 ms
53,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no064;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long[] f = new long[3];
		f[0] = sc.nextLong();
		f[1] = sc.nextLong();
		f[2] = f[0] ^ f[1];
		long n = sc.nextLong();
		System.out.println(f[(int) (n%3)]);
	}

}
0