結果

問題 No.64 XORフィボナッチ数列
ユーザー kou6839
提出日時 2014-11-21 22:29:55
言語 Java
(openjdk 23)
結果
AC  
実行時間 119 ms / 5,000 ms
コード長 342 bytes
コンパイル時間 2,221 ms
コンパイル使用メモリ 76,196 KB
実行使用メモリ 41,964 KB
最終ジャッジ日時 2025-01-02 20:04:20
合計ジャッジ時間 4,844 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

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