結果

問題 No.64 XORフィボナッチ数列
ユーザー papipenpapipen
提出日時 2017-04-08 22:53:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 339 bytes
コンパイル時間 1,950 ms
コンパイル使用メモリ 71,472 KB
実行使用メモリ 56,724 KB
最終ジャッジ日時 2023-09-24 23:37:41
合計ジャッジ時間 4,602 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
56,040 KB
testcase_01 AC 123 ms
56,028 KB
testcase_02 AC 119 ms
54,180 KB
testcase_03 AC 122 ms
55,780 KB
testcase_04 AC 123 ms
55,508 KB
testcase_05 AC 120 ms
55,872 KB
testcase_06 AC 124 ms
55,744 KB
testcase_07 AC 120 ms
55,912 KB
testcase_08 AC 120 ms
55,752 KB
testcase_09 AC 122 ms
56,724 KB
testcase_10 AC 123 ms
55,932 KB
testcase_11 AC 120 ms
56,208 KB
testcase_12 AC 119 ms
55,696 KB
testcase_13 AC 125 ms
55,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class N064{
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		long f0 = s.nextLong();
		long f1 = s.nextLong();
		long n = s.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