結果
| 問題 | No.292 芸名 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-13 13:09:25 |
| 言語 | Elixir (1.19.5) |
| 結果 |
AC
|
| 実行時間 | 327 ms / 2,000 ms |
| コード長 | 321 bytes |
| 記録 | |
| コンパイル時間 | 878 ms |
| コンパイル使用メモリ | 72,592 KB |
| 実行使用メモリ | 63,236 KB |
| 最終ジャッジ日時 | 2026-06-04 15:16:04 |
| 合計ジャッジ時間 | 6,494 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
コンパイルメッセージ
warning: using single-quoted strings to represent charlists is deprecated.
Use ~c"" if you indeed want a charlist or use "" instead.
You may run "mix format --migrate" to change all single-quoted
strings to use the ~c sigil and fix this warning.
│
12 │ |> List.replace_at(t |> String.to_integer(), '_')
│ ~
│
└─ Main.exs:12:50
warning: using single-quoted strings to represent charlists is deprecated.
Use ~c"" if you indeed want a charlist or use "" instead.
You may run "mix format --migrate" to change all single-quoted
strings to use the ~c sigil and fix this warning.
│
13 │ |> List.replace_at(u |> String.to_integer(), '_')
│ ~
│
└─ Main.exs:13:50
warning: using single-quoted strings to represent charlists is deprecated.
Use ~c"" if you indeed want a charlist or use "" instead.
You may run "mix format --migrate" to change all single-quoted
strings to use the ~c sigil and fix this warning.
│
14 │ |> Enum.filter(&(&1 != '_'))
│ ~
│
└─ Main.exs:14:28
ソースコード
defmodule Main do
def main do
IO.read(:line)
|> String.split()
|> solve
|> IO.puts()
end
defp solve([s, t, u]) do
s
|> String.to_charlist()
|> List.replace_at(t |> String.to_integer(), '_')
|> List.replace_at(u |> String.to_integer(), '_')
|> Enum.filter(&(&1 != '_'))
end
end