結果

問題 No.480 合計
ユーザー asumasum
提出日時 2024-04-08 10:30:17
言語 Elixir
(1.16.2)
結果
AC  
実行時間 545 ms / 2,000 ms
コード長 234 bytes
コンパイル時間 6,416 ms
コンパイル使用メモリ 61,016 KB
実行使用メモリ 57,092 KB
最終ジャッジ日時 2024-04-08 10:31:09
合計ジャッジ時間 22,392 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 525 ms
55,204 KB
testcase_01 AC 506 ms
55,124 KB
testcase_02 AC 507 ms
54,620 KB
testcase_03 AC 507 ms
55,204 KB
testcase_04 AC 535 ms
55,204 KB
testcase_05 AC 504 ms
54,992 KB
testcase_06 AC 509 ms
55,204 KB
testcase_07 AC 533 ms
55,204 KB
testcase_08 AC 507 ms
54,784 KB
testcase_09 AC 511 ms
55,124 KB
testcase_10 AC 526 ms
54,796 KB
testcase_11 AC 522 ms
54,784 KB
testcase_12 AC 531 ms
55,204 KB
testcase_13 AC 510 ms
57,092 KB
testcase_14 AC 531 ms
55,204 KB
testcase_15 AC 504 ms
55,040 KB
testcase_16 AC 507 ms
55,204 KB
testcase_17 AC 545 ms
55,192 KB
testcase_18 AC 505 ms
55,020 KB
testcase_19 AC 534 ms
54,644 KB
testcase_20 AC 504 ms
55,204 KB
testcase_21 AC 532 ms
55,204 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