結果
| 問題 |
No.64 XORフィボナッチ数列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-01 02:32:09 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 695 bytes |
| コンパイル時間 | 986 ms |
| コンパイル使用メモリ | 103,680 KB |
| 実行使用メモリ | 834,048 KB |
| 最終ジャッジ日時 | 2024-11-22 11:17:17 |
| 合計ジャッジ時間 | 13,029 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 TLE * 1 |
| other | AC * 7 MLE * 4 |
コンパイルメッセージ
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.Generic;
using System.Linq;
namespace yukicode {
public class Program {
static UInt64 F0, F1, N;
public static UInt64 FNumber(UInt64 n) {
return n >= 2 ? (FNumber( n - 1 ) ^ FNumber( n - 2 )) : ( n == 1 ? F1 : F0 );
}
public static UInt64 Solver(System.IO.TextReader reader) {
var buf = reader.ReadLine().Split();
F0 = UInt64.Parse( buf[ 0 ] );
F1 = UInt64.Parse( buf[ 1 ] );
N = UInt64.Parse( buf[ 2 ] );
return FNumber( N );
}
private static void Main() {
Console.WriteLine( Solver( Console.In ) );
}
}
}