結果

問題 No.1271 初めての級数
ユーザー natoriusannatoriusan
提出日時 2023-08-01 16:02:59
言語 F#
(F# 4.0)
結果
AC  
実行時間 312 ms / 2,000 ms
コード長 198 bytes
コンパイル時間 7,919 ms
コンパイル使用メモリ 184,368 KB
実行使用メモリ 35,268 KB
最終ジャッジ日時 2024-04-19 15:22:38
合計ジャッジ時間 11,291 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 306 ms
33,844 KB
testcase_01 AC 305 ms
34,760 KB
testcase_02 AC 312 ms
34,748 KB
testcase_03 AC 310 ms
34,636 KB
testcase_04 AC 310 ms
35,016 KB
testcase_05 AC 306 ms
34,900 KB
testcase_06 AC 303 ms
35,268 KB
testcase_07 AC 304 ms
34,240 KB
testcase_08 AC 309 ms
34,984 KB
testcase_09 AC 302 ms
34,768 KB
testcase_10 AC 305 ms
34,768 KB
testcase_11 AC 302 ms
34,976 KB
testcase_12 AC 302 ms
34,892 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (245 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

let k = stdin.ReadLine () |> int

if k = 0 then
    System.Math.PI ** 2. / 6.
else
    [|
        for i in 1..k ->
            1./(float i)
    |] |> Array.sum |> ((*)(1./(float k)))
|> printfn "%f"
0