結果
問題 | No.487 2017 Calculation(2017の計算) |
ユーザー |
![]() |
提出日時 | 2019-07-04 15:47:16 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 54 ms / 2,000 ms |
コード長 | 312 bytes |
コンパイル時間 | 6,293 ms |
コンパイル使用メモリ | 186,644 KB |
実行使用メモリ | 29,312 KB |
最終ジャッジ日時 | 2024-09-19 03:58:13 |
合計ジャッジ時間 | 7,916 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (211 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/
ソースコード
module Yukiopen Systemlet [<Literal>] YEAR = 2017Llet solve m =let square = YEAR * YEARlet rec f acc =function| 1 -> (acc * square) % m| n -> f ((acc * square) % m) (n - 1)(2017L + (f 1L 2017)) % mlet M = int64 <| Console.ReadLine()solve M|> Console.WriteLine