結果

問題 No.83 最大マッチング
ユーザー 3qvwn3qvwn
提出日時 2019-07-04 22:42:53
言語 Elixir
(1.16.2)
結果
AC  
実行時間 621 ms / 5,000 ms
コード長 279 bytes
コンパイル時間 1,096 ms
コンパイル使用メモリ 54,724 KB
実行使用メモリ 49,764 KB
最終ジャッジ日時 2023-08-29 23:40:40
合計ジャッジ時間 10,469 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 613 ms
49,208 KB
testcase_01 AC 618 ms
49,336 KB
testcase_02 AC 621 ms
49,316 KB
testcase_03 AC 613 ms
49,220 KB
testcase_04 AC 620 ms
49,592 KB
testcase_05 AC 619 ms
49,164 KB
testcase_06 AC 621 ms
49,376 KB
testcase_07 AC 616 ms
49,252 KB
testcase_08 AC 615 ms
49,620 KB
testcase_09 AC 611 ms
49,764 KB
testcase_10 AC 606 ms
49,352 KB
testcase_11 AC 598 ms
49,304 KB
testcase_12 AC 608 ms
49,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do 
  def main do
    IO.gets("") |> String.trim |> String.to_integer |> matching |> IO.puts
  end
  
  def matching(n) when rem(n, 2) == 0 do
    String.duplicate("1", div(n,2))
  end
  
  def matching(n) do
    "7" <> String.duplicate("1", div(n-3, 2))
  end
end
0