結果
問題 |
No.354 メルセンヌ素数
|
ユーザー |
|
提出日時 | 2016-04-28 23:49:31 |
言語 | F# (F# 4.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 248 bytes |
コンパイル時間 | 13,106 ms |
コンパイル使用メモリ | 182,056 KB |
実行使用メモリ | 63,528 KB |
最終ジャッジ日時 | 2024-10-04 17:27:35 |
合計ジャッジ時間 | 17,544 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 6 TLE * 1 -- * 6 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (351 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/
ソースコード
open System let toSosu p = bigint 2 ** p - bigint.One let toBinSeq num = Seq.unfold (fun n -> if n = bigint.Zero then None else Some(int(n % bigint 2), n / bigint 2)) num Console.ReadLine () |> int |> toSosu |> toBinSeq |> Seq.sum |> printfn "%d"