結果

問題 No.64 XORフィボナッチ数列
ユーザー リチウムリチウム
提出日時 2014-11-11 23:38:33
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 319 bytes
コンパイル時間 4,116 ms
コンパイル使用メモリ 71,232 KB
実行使用メモリ 58,068 KB
最終ジャッジ日時 2023-08-30 03:13:23
合計ジャッジ時間 6,923 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,588 KB
testcase_01 AC 126 ms
55,816 KB
testcase_02 AC 126 ms
55,660 KB
testcase_03 AC 125 ms
55,728 KB
testcase_04 AC 123 ms
55,856 KB
testcase_05 AC 124 ms
56,144 KB
testcase_06 AC 117 ms
55,496 KB
testcase_07 AC 124 ms
55,720 KB
testcase_08 AC 124 ms
55,684 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 AC 121 ms
55,724 KB
testcase_13 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class ok{
	public static void main(String[] args) {
		Scanner sc=new Scanner (System.in);
		long f=sc.nextLong();
		long g=sc.nextLong();
		int n=sc.nextInt();
		long h=f^g;
		long ans;
		if(n%3==0)ans=f;
		else if(n%3==1)ans=g;
		else ans=h;
		
		System.out.println(ans);
	}}
0