結果

問題 No.63 ポッキーゲーム
ユーザー 3qvwn3qvwn
提出日時 2019-07-03 22:53:21
言語 Elixir
(1.16.2)
結果
TLE  
実行時間 -
コード長 272 bytes
コンパイル時間 987 ms
コンパイル使用メモリ 55,304 KB
実行使用メモリ 57,656 KB
最終ジャッジ日時 2023-08-29 23:38:17
合計ジャッジ時間 16,456 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 613 ms
49,288 KB
testcase_01 AC 609 ms
48,984 KB
testcase_02 AC 607 ms
49,368 KB
testcase_03 AC 603 ms
49,848 KB
testcase_04 AC 610 ms
49,344 KB
testcase_05 AC 605 ms
49,920 KB
testcase_06 AC 611 ms
49,088 KB
testcase_07 AC 616 ms
49,496 KB
testcase_08 AC 615 ms
49,220 KB
testcase_09 AC 642 ms
49,132 KB
testcase_10 AC 736 ms
49,340 KB
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do 
  def main do
    IO.gets("") |> String.trim |> String.split |> Enum.map(&String.to_integer/1) |> pokky(0) |> IO.puts
  end
  
  def pokky([l, k], acc) when l-k*2 > 0 do
    pokky([l-k*2, k], acc+k)
  end
  
  def pokky([_, _], acc) do
    acc
  end
end
0