結果

問題 No.480 合計
ユーザー shiroshiro
提出日時 2019-05-30 18:53:56
言語 Elixir
(1.16.2)
結果
AC  
実行時間 649 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 1,037 ms
コンパイル使用メモリ 55,200 KB
実行使用メモリ 50,316 KB
最終ジャッジ日時 2023-08-29 23:23:11
合計ジャッジ時間 16,515 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 633 ms
49,240 KB
testcase_01 AC 627 ms
49,348 KB
testcase_02 AC 631 ms
49,172 KB
testcase_03 AC 621 ms
49,228 KB
testcase_04 AC 626 ms
50,088 KB
testcase_05 AC 621 ms
49,168 KB
testcase_06 AC 622 ms
49,228 KB
testcase_07 AC 620 ms
49,816 KB
testcase_08 AC 623 ms
48,988 KB
testcase_09 AC 638 ms
50,096 KB
testcase_10 AC 630 ms
50,136 KB
testcase_11 AC 635 ms
49,248 KB
testcase_12 AC 625 ms
49,336 KB
testcase_13 AC 624 ms
49,264 KB
testcase_14 AC 613 ms
50,104 KB
testcase_15 AC 626 ms
49,292 KB
testcase_16 AC 623 ms
49,744 KB
testcase_17 AC 622 ms
49,240 KB
testcase_18 AC 629 ms
49,476 KB
testcase_19 AC 649 ms
49,168 KB
testcase_20 AC 640 ms
50,316 KB
testcase_21 AC 644 ms
49,200 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