結果

問題 No.64 XORフィボナッチ数列
ユーザー リチウム
提出日時 2014-11-11 23:38:33
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 319 bytes
コンパイル時間 3,542 ms
コンパイル使用メモリ 78,288 KB
実行使用メモリ 54,596 KB
最終ジャッジ日時 2024-12-31 09:51:59
合計ジャッジ時間 6,643 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7 RE * 4
権限があれば一括ダウンロードができます

ソースコード

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