結果

問題 No.480 合計
ユーザー nohopennohopen
提出日時 2019-06-09 11:16:39
言語 F#
(F# 4.0)
結果
AC  
実行時間 345 ms / 2,000 ms
コード長 145 bytes
コンパイル時間 7,452 ms
コンパイル使用メモリ 183,920 KB
実行使用メモリ 34,736 KB
最終ジャッジ日時 2024-04-15 20:04:18
合計ジャッジ時間 16,366 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 338 ms
34,332 KB
testcase_01 AC 341 ms
34,464 KB
testcase_02 AC 339 ms
34,480 KB
testcase_03 AC 338 ms
34,340 KB
testcase_04 AC 338 ms
34,356 KB
testcase_05 AC 345 ms
34,736 KB
testcase_06 AC 344 ms
34,732 KB
testcase_07 AC 337 ms
34,576 KB
testcase_08 AC 339 ms
33,928 KB
testcase_09 AC 335 ms
34,472 KB
testcase_10 AC 339 ms
34,220 KB
testcase_11 AC 340 ms
34,212 KB
testcase_12 AC 339 ms
34,344 KB
testcase_13 AC 332 ms
34,476 KB
testcase_14 AC 333 ms
34,608 KB
testcase_15 AC 333 ms
34,608 KB
testcase_16 AC 337 ms
34,344 KB
testcase_17 AC 337 ms
34,600 KB
testcase_18 AC 340 ms
34,724 KB
testcase_19 AC 337 ms
34,172 KB
testcase_20 AC 333 ms
34,216 KB
testcase_21 AC 338 ms
34,732 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (258 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 #

open System

let rec sum n = 
  let ans = 0 in
    if n < 0 then ans
    else n + sum (n-1)

let n = int(Console.ReadLine())
printfn "%d" (sum n)
0