結果
| 問題 | 
                            No.64 XORフィボナッチ数列
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2014-11-21 14:51:03 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 118 ms / 5,000 ms | 
| コード長 | 366 bytes | 
| コンパイル時間 | 3,237 ms | 
| コンパイル使用メモリ | 76,484 KB | 
| 実行使用メモリ | 41,808 KB | 
| 最終ジャッジ日時 | 2025-01-02 19:59:47 | 
| 合計ジャッジ時間 | 5,631 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 11 | 
ソースコード
import java.util.Scanner;
public class Yukicoder64 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long f0 = sc.nextLong();
		long f1 = sc.nextLong();
		long N = sc.nextLong();
		
		long fn;
		
		if (N % 3 == 0) fn = f0;
		else if (N % 3 == 1) fn = f1;
		else fn = f0 ^ f1;
		
		System.out.println(fn);
	}
}