結果

問題 No.487 2017 Calculation(2017の計算)
ユーザー nobigomunobigomu
提出日時 2018-06-08 19:31:39
言語 F#
(F# 4.0)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 170 bytes
コンパイル時間 4,970 ms
コンパイル使用メモリ 158,568 KB
実行使用メモリ 24,848 KB
最終ジャッジ日時 2023-09-12 23:23:23
合計ジャッジ時間 5,490 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
22,684 KB
testcase_01 AC 81 ms
22,684 KB
testcase_02 AC 81 ms
24,708 KB
testcase_03 AC 81 ms
22,744 KB
testcase_04 AC 81 ms
24,792 KB
testcase_05 AC 81 ms
22,788 KB
testcase_06 AC 81 ms
22,880 KB
testcase_07 AC 80 ms
22,812 KB
testcase_08 AC 81 ms
24,848 KB
testcase_09 AC 80 ms
24,720 KB
testcase_10 AC 81 ms
24,800 KB
testcase_11 AC 81 ms
24,844 KB
testcase_12 AC 81 ms
22,708 KB
testcase_13 AC 81 ms
24,732 KB
testcase_14 AC 82 ms
24,720 KB
testcase_15 AC 82 ms
22,808 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let f m =
    let t = 2017%m
    let rec iter n r = if n>1 then iter (n-1) ((r*t)%m) else (t+r)%m
    iter (2*2017) t
    
(stdin.ReadLine >> int) () |> f |> printfn "%d"
0