結果
問題 | No.1070 Missing a space |
ユーザー |
![]() |
提出日時 | 2024-11-07 06:03:11 |
言語 | Elixir (1.18.1) |
結果 |
AC
|
実行時間 | 688 ms / 1,000 ms |
コード長 | 365 bytes |
コンパイル時間 | 2,787 ms |
コンパイル使用メモリ | 61,396 KB |
実行使用メモリ | 54,292 KB |
最終ジャッジ日時 | 2024-11-07 06:03:22 |
合計ジャッジ時間 | 9,937 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
defmodule Main do def input, do: IO.read(:line) |> String.trim def ii, do: input() |> String.to_integer def li, do: input() |> String.split |> Enum.map(&String.to_integer/1) def yn(b), do: IO.puts(if b, do: "Yes", else: "No") def main do cs = input() |> String.graphemes() ans = Enum.count(cs, fn c -> c != "0" end) - 1 IO.puts ans end end