結果

問題 No.64 XORフィボナッチ数列
ユーザー Nobita GomuNobita Gomu
提出日時 2017-10-18 23:41:50
言語 F#
(F# 4.0)
結果
TLE  
実行時間 -
コード長 333 bytes
コンパイル時間 4,658 ms
コンパイル使用メモリ 159,652 KB
実行使用メモリ 24,956 KB
最終ジャッジ日時 2023-08-11 21:09:07
合計ジャッジ時間 12,407 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
24,956 KB
testcase_01 AC 84 ms
24,852 KB
testcase_02 AC 83 ms
22,764 KB
testcase_03 AC 83 ms
22,916 KB
testcase_04 AC 82 ms
20,788 KB
testcase_05 AC 81 ms
22,800 KB
testcase_06 AC 82 ms
22,924 KB
testcase_07 AC 83 ms
22,904 KB
testcase_08 AC 83 ms
24,876 KB
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let n0, n1, n =
    stdin.ReadLine ()
    |> fun s -> s.Split ' '
    |> Array.map int64
    |> fun a -> (a.[0], a.[1], a.[2])

let inline fib n =
    let rec iter pp p c =
        if c = LanguagePrimitives.GenericZero then pp
        else iter p (pp ^^^ p) (c - LanguagePrimitives.GenericOne)
    iter n0 n1 n

fib n |> printfn "%d"
0