Powered by AppSignal & Oban Pro
Would you like to see your link here? Contact us

ABC134A - Dodecagon

submit_1.livemd

ABC134A - Dodecagon

問題

回答

defmodule Main do
  def main do
    :stdio
    |> IO.read(:all)
    |> solve()
    |> IO.puts()
  end

  def solve(input) do
    r =
      input
      |> String.trim()
      |> String.to_integer()

    3 * r * r
  end
end
"""
4
"""
|> Main.solve()
|> then(&(&1 == 48))
"""
15
"""
|> Main.solve()
|> then(&(&1 == 675))
"""
80
"""
|> Main.solve()
|> then(&(&1 == 19200))