結果

問題 No.64 XORフィボナッチ数列
ユーザー taktak
提出日時 2019-02-10 17:51:19
言語 F#
(F# 4.0)
結果
TLE  
実行時間 -
コード長 286 bytes
コンパイル時間 4,080 ms
コンパイル使用メモリ 156,368 KB
実行使用メモリ 24,976 KB
最終ジャッジ日時 2023-09-20 19:35:24
合計ジャッジ時間 11,790 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
24,976 KB
testcase_01 AC 81 ms
22,804 KB
testcase_02 AC 83 ms
22,820 KB
testcase_03 AC 83 ms
22,848 KB
testcase_04 AC 83 ms
22,744 KB
testcase_05 AC 83 ms
24,748 KB
testcase_06 AC 82 ms
22,924 KB
testcase_07 AC 82 ms
22,804 KB
testcase_08 AC 84 ms
24,800 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 xorFib n f0 f1 =
  let rec f n ``f_n-2`` ``f_n-1`` =
    match n with
    | 0L -> ``f_n-2``
    | _ -> f (n-1L) ``f_n-1`` (``f_n-2``^^^``f_n-1``)
  f n f0 f1

let f0, f1, n =
  let t = stdin.ReadLine().Split() |> Array.map int64
  t.[0], t.[1], t.[2]

xorFib n f0 f1
|> printfn "%i"
0