結果

問題 No.480 合計
ユーザー shiroshiro
提出日時 2021-07-10 22:39:12
言語 Elixir
(1.16.2)
結果
AC  
実行時間 616 ms / 2,000 ms
コード長 234 bytes
コンパイル時間 979 ms
コンパイル使用メモリ 55,020 KB
実行使用メモリ 50,380 KB
最終ジャッジ日時 2023-09-14 19:59:11
合計ジャッジ時間 15,709 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 598 ms
49,280 KB
testcase_01 AC 602 ms
50,060 KB
testcase_02 AC 610 ms
49,944 KB
testcase_03 AC 615 ms
49,432 KB
testcase_04 AC 616 ms
49,236 KB
testcase_05 AC 610 ms
49,384 KB
testcase_06 AC 599 ms
49,924 KB
testcase_07 AC 583 ms
49,964 KB
testcase_08 AC 590 ms
49,760 KB
testcase_09 AC 593 ms
50,380 KB
testcase_10 AC 590 ms
49,872 KB
testcase_11 AC 594 ms
50,040 KB
testcase_12 AC 586 ms
49,196 KB
testcase_13 AC 592 ms
49,296 KB
testcase_14 AC 596 ms
49,152 KB
testcase_15 AC 598 ms
49,240 KB
testcase_16 AC 600 ms
49,188 KB
testcase_17 AC 603 ms
50,236 KB
testcase_18 AC 589 ms
49,352 KB
testcase_19 AC 603 ms
49,648 KB
testcase_20 AC 588 ms
49,308 KB
testcase_21 AC 606 ms
49,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do
    def main do
        IO.gets("")
        |> String.trim
        |> String.to_integer
        |> sumn
        |> IO.puts
    end
    defp sumn(n) do
        Enum.to_list(1..n) |> Enum.reduce(&(&1 + &2))
    end
end
0