結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー shiro
提出日時 2019-06-03 19:34:36
言語 Elixir
(1.18.1)
結果
WA  
実行時間 -
コード長 261 bytes
コンパイル時間 1,355 ms
コンパイル使用メモリ 64,968 KB
実行使用メモリ 229,648 KB
最終ジャッジ日時 2024-12-31 02:56:35
合計ジャッジ時間 17,112 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 4
other WA * 15
権限があれば一括ダウンロードができます
コンパイルメッセージ
    warning: variable "n1" is unused (if the variable is not meant to be used, prefix it with an underscore)
    │
  3 │     {n1, n2} = input()
    │      ~~
    │
    └─ Main.exs:3:6: Main.main/0

ソースコード

diff #

defmodule Main do
  def main do
    {n1, n2} = input()
    Enum.sum(n2)
  end
  def input() do
    n1 = IO.gets("") |> String.trim |> String.to_integer
    n2 = IO.gets("") |> String.trim |> String.split |> Enum.map(&String.to_integer/1)
    {n1, n2}
  end
end
0