結果
| 問題 |
No.47 ポケットを叩くとビスケットが2倍
|
| コンテスト | |
| ユーザー |
3qvwn
|
| 提出日時 | 2019-07-02 10:55:26 |
| 言語 | Elixir (1.18.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 322 bytes |
| コンパイル時間 | 1,068 ms |
| コンパイル使用メモリ | 63,396 KB |
| 実行使用メモリ | 55,284 KB |
| 最終ジャッジ日時 | 2024-12-31 03:09:07 |
| 合計ジャッジ時間 | 16,451 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 19 WA * 2 |
ソースコード
defmodule Main do
def main do
n = IO.gets("") |> String.trim |> String.to_integer
strike(1, n, 0)
end
def strike(biscuit, n, count) when biscuit <= n do
strike(pocket(biscuit), n, count + 1)
end
def strike(_biscuit, _n, count) do
IO.puts count
end
def pocket(n) do
n * 2
end
end
3qvwn