結果
| 問題 |
No.64 XORフィボナッチ数列
|
| コンテスト | |
| ユーザー |
kuuso1
|
| 提出日時 | 2014-11-11 23:31:38 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 5,000 ms |
| コード長 | 1,163 bytes |
| コンパイル時間 | 2,794 ms |
| コンパイル使用メモリ | 113,616 KB |
| 実行使用メモリ | 26,148 KB |
| 最終ジャッジ日時 | 2024-12-31 09:49:48 |
| 合計ジャッジ時間 | 2,059 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections;
using System.Collections.Generic;
class TEST{
static void Main(){
Sol mySol =new Sol();
mySol.Solve();
}
}
class Sol{
public void Solve(){
var d=rla();
long F0=d[0];
long F1=d[1];
long N=d[2];
if(N==0){
Console.WriteLine(F0);
return;
}
if(N==1){
Console.WriteLine(F1);
return;
}
if(N%3==0){
Console.WriteLine(F0);
return;
}
if(N%3==1){
Console.WriteLine(F1);
return;
}
Console.WriteLine(F1^F0);
}
public Sol(){
}
static String rs(){return Console.ReadLine();}
static int ri(){return int.Parse(Console.ReadLine());}
static long rl(){return long.Parse(Console.ReadLine());}
static double rd(){return double.Parse(Console.ReadLine());}
static String[] rsa(){return Console.ReadLine().Split(' ');}
static int[] ria(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>int.Parse(e));}
static long[] rla(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>long.Parse(e));}
static double[] rda(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>double.Parse(e));}
}
kuuso1