結果

問題 No.207 世界のなんとか
ユーザー gemmarogemmaro
提出日時 2020-04-16 20:51:32
言語 Elixir
(1.16.2)
結果
AC  
実行時間 627 ms / 5,000 ms
コード長 354 bytes
コンパイル時間 1,252 ms
コンパイル使用メモリ 55,640 KB
実行使用メモリ 50,352 KB
最終ジャッジ日時 2023-08-30 00:17:55
合計ジャッジ時間 14,546 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 610 ms
49,164 KB
testcase_01 AC 619 ms
49,340 KB
testcase_02 AC 611 ms
49,248 KB
testcase_03 AC 616 ms
49,800 KB
testcase_04 AC 618 ms
49,744 KB
testcase_05 AC 624 ms
49,292 KB
testcase_06 AC 618 ms
50,352 KB
testcase_07 AC 621 ms
50,036 KB
testcase_08 AC 610 ms
49,352 KB
testcase_09 AC 624 ms
49,400 KB
testcase_10 AC 609 ms
49,196 KB
testcase_11 AC 612 ms
49,912 KB
testcase_12 AC 619 ms
49,796 KB
testcase_13 AC 615 ms
49,376 KB
testcase_14 AC 627 ms
49,280 KB
testcase_15 AC 617 ms
49,328 KB
testcase_16 AC 618 ms
49,872 KB
testcase_17 AC 626 ms
49,336 KB
testcase_18 AC 618 ms
49,408 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do
  def main do
    IO.read(:line)
    |> String.split()
    |> Enum.map(&String.to_integer/1)
    |> solve
    |> IO.puts()
  end

  defp solve([a, b]) do
    a..b
    |> Enum.filter(fn i ->
      i |> rem(3) == 0 ||
        i |> to_string |> String.to_charlist() |> Enum.count(&(&1 == ?3)) >= 1
    end)
    |> Enum.join("\n")
  end
end
0