結果

問題 No.64 XORフィボナッチ数列
ユーザー tentententen
提出日時 2020-11-05 08:27:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 5,000 ms
コード長 302 bytes
コンパイル時間 2,609 ms
コンパイル使用メモリ 72,328 KB
実行使用メモリ 56,244 KB
最終ジャッジ日時 2023-09-29 16:43:26
合計ジャッジ時間 4,486 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
56,096 KB
testcase_01 AC 116 ms
55,836 KB
testcase_02 AC 119 ms
56,180 KB
testcase_03 AC 117 ms
55,868 KB
testcase_04 AC 116 ms
56,244 KB
testcase_05 AC 115 ms
56,072 KB
testcase_06 AC 116 ms
55,868 KB
testcase_07 AC 115 ms
56,024 KB
testcase_08 AC 116 ms
56,008 KB
testcase_09 AC 116 ms
56,132 KB
testcase_10 AC 116 ms
54,204 KB
testcase_11 AC 116 ms
55,732 KB
testcase_12 AC 114 ms
55,660 KB
testcase_13 AC 115 ms
55,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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