結果

問題 No.480 合計
ユーザー nao22bnao22b
提出日時 2019-04-12 21:07:02
言語 Elixir
(1.16.2)
結果
AC  
実行時間 646 ms / 2,000 ms
コード長 270 bytes
コンパイル時間 1,110 ms
コンパイル使用メモリ 54,732 KB
実行使用メモリ 50,368 KB
最終ジャッジ日時 2023-08-29 23:14:38
合計ジャッジ時間 17,013 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 631 ms
49,156 KB
testcase_01 AC 623 ms
49,396 KB
testcase_02 AC 628 ms
49,228 KB
testcase_03 AC 635 ms
49,244 KB
testcase_04 AC 637 ms
49,428 KB
testcase_05 AC 639 ms
49,112 KB
testcase_06 AC 635 ms
49,876 KB
testcase_07 AC 632 ms
49,360 KB
testcase_08 AC 642 ms
49,228 KB
testcase_09 AC 618 ms
49,188 KB
testcase_10 AC 636 ms
49,352 KB
testcase_11 AC 624 ms
50,288 KB
testcase_12 AC 621 ms
49,076 KB
testcase_13 AC 625 ms
49,208 KB
testcase_14 AC 628 ms
49,256 KB
testcase_15 AC 631 ms
49,248 KB
testcase_16 AC 626 ms
49,752 KB
testcase_17 AC 638 ms
49,220 KB
testcase_18 AC 646 ms
49,140 KB
testcase_19 AC 626 ms
49,356 KB
testcase_20 AC 640 ms
49,324 KB
testcase_21 AC 634 ms
50,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do
    def solve(n, n, t) do
        n + t
    end
    def solve(a, b, t) do
        solve(a + 1, b, a + t)
    end

    def main do
        n = IO.gets("") |> String.trim |> String.to_integer
        b = solve(1, n, 0)
        IO.puts "#{b}"
    end
end
0