結果

問題 No.64 XORフィボナッチ数列
ユーザー tentententen
提出日時 2020-11-05 08:27:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 138 ms / 5,000 ms
コード長 302 bytes
コンパイル時間 2,166 ms
コンパイル使用メモリ 73,412 KB
実行使用メモリ 41,728 KB
最終ジャッジ日時 2024-07-22 10:48:56
合計ジャッジ時間 4,798 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
41,200 KB
testcase_01 AC 136 ms
41,076 KB
testcase_02 AC 138 ms
41,284 KB
testcase_03 AC 136 ms
41,080 KB
testcase_04 AC 134 ms
41,104 KB
testcase_05 AC 133 ms
41,072 KB
testcase_06 AC 119 ms
39,988 KB
testcase_07 AC 137 ms
41,248 KB
testcase_08 AC 133 ms
41,028 KB
testcase_09 AC 117 ms
39,748 KB
testcase_10 AC 133 ms
41,084 KB
testcase_11 AC 136 ms
41,416 KB
testcase_12 AC 138 ms
41,412 KB
testcase_13 AC 133 ms
41,728 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