結果

問題 No.64 XORフィボナッチ数列
ユーザー kou6839kou6839
提出日時 2014-11-21 22:29:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 342 bytes
コンパイル時間 1,917 ms
コンパイル使用メモリ 71,620 KB
実行使用メモリ 56,340 KB
最終ジャッジ日時 2023-08-30 22:11:22
合計ジャッジ時間 4,491 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,932 KB
testcase_01 AC 121 ms
55,728 KB
testcase_02 AC 121 ms
56,040 KB
testcase_03 AC 122 ms
55,936 KB
testcase_04 AC 123 ms
55,892 KB
testcase_05 AC 120 ms
55,728 KB
testcase_06 AC 121 ms
55,936 KB
testcase_07 AC 121 ms
56,340 KB
testcase_08 AC 120 ms
55,728 KB
testcase_09 AC 121 ms
55,984 KB
testcase_10 AC 121 ms
55,448 KB
testcase_11 AC 124 ms
55,772 KB
testcase_12 AC 121 ms
55,976 KB
testcase_13 AC 120 ms
55,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
 

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long m=sc.nextLong();
		long l=sc.nextLong();
		long n2=n^m;
		if(l%3==0) System.out.println(n);
		else if(l%3==1) System.out.println(m);
		else System.out.println(n2);
	}
}	
0