結果

問題 No.64 XORフィボナッチ数列
ユーザー TaK7907TaK7907
提出日時 2017-11-01 02:32:09
言語 C#(csc)
(csc 3.9.0)
結果
TLE  
実行時間 -
コード長 695 bytes
コンパイル時間 864 ms
コンパイル使用メモリ 103,936 KB
実行使用メモリ 22,016 KB
最終ジャッジ日時 2024-05-02 01:50:41
合計ジャッジ時間 7,194 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
17,792 KB
testcase_01 AC 24 ms
17,536 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.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 ) );
        }
    }
}
0