結果

問題 No.64 XORフィボナッチ数列
ユーザー syoken_desukasyoken_desuka
提出日時 2015-02-21 15:37:12
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 24 ms / 5,000 ms
コード長 2,899 bytes
コンパイル時間 770 ms
コンパイル使用メモリ 112,724 KB
実行使用メモリ 25,784 KB
最終ジャッジ日時 2024-06-23 21:36:31
合計ジャッジ時間 1,656 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
23,392 KB
testcase_01 AC 22 ms
23,856 KB
testcase_02 AC 24 ms
25,592 KB
testcase_03 AC 22 ms
25,780 KB
testcase_04 AC 22 ms
25,784 KB
testcase_05 AC 22 ms
23,728 KB
testcase_06 AC 23 ms
23,652 KB
testcase_07 AC 22 ms
23,396 KB
testcase_08 AC 22 ms
23,900 KB
testcase_09 AC 22 ms
25,696 KB
testcase_10 AC 22 ms
21,556 KB
testcase_11 AC 22 ms
23,652 KB
testcase_12 AC 22 ms
25,688 KB
testcase_13 AC 22 ms
23,872 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #
プレゼンテーションモードにする

using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using sc = Scanner;
class Program
{
static void Main(string[] args)
{
Solve();
#if DEBUG
System.Console.WriteLine("");
System.Console.ReadKey();
#endif
}
/// <summary>
///
/// </summary>
static void Solve()
{
long f0 = sc.NextLong();
long f1 = sc.NextLong();
long n = sc.NextLong();
long[] f = { f0, f1, f1 ^ f0 };
Console.WriteLine(f[n % 3]);
}
}
/// <summary>
/// Java
/// </summary>
public static class Scanner
{
public static string NextString()
{
string tmp = "";
while (true)
{
string readData = char.ConvertFromUtf32(Console.Read());
if (readData == " " || readData == "\n")
break;
tmp += readData;
}
return tmp;
}
public static string[] NextStrArray()
{
return Console.ReadLine().Split(' ');
}
public static long[] NextLongArray()
{
string[] s = NextStrArray();
long[] a = new long[s.Length];
for (int i = 0; i < a.Length; i++)
{
a[i] = long.Parse(s[i]);
}
return a;
}
public static int[] NextIntArray()
{
string[] s = NextStrArray();
int[] a = new int[s.Length];
for (int i = 0; i < a.Length; i++)
{
a[i] = int.Parse(s[i]);
}
return a;
}
public static int NextInt()
{
string tmp = "";
while (true)
{
string readData = char.ConvertFromUtf32(Console.Read());
if (readData == " " || readData == "\n")
break;
tmp += readData;
}
return int.Parse(tmp);
}
public static double NextDouble()
{
string tmp = "";
while (true)
{
string readData = char.ConvertFromUtf32(Console.Read());
if (readData == " " || readData == "\n")
break;
tmp += readData;
}
return double.Parse(tmp);
}
public static long NextLong()
{
string tmp = "";
while (true)
{
string readData = char.ConvertFromUtf32(Console.Read());
if (readData == " " || readData == "\n")
break;
tmp += readData;
}
return long.Parse(tmp);
}
public static double[] NextDoubleArray()
{
string[] s = NextStrArray();
double[] a = new double[s.Length];
for (int i = 0; i < a.Length; i++)
{
a[i] = double.Parse(s[i]);
}
return a;
}
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0