結果

問題 No.83 最大マッチング
ユーザー yukiccoyukicco
提出日時 2018-11-23 23:35:06
言語 Elixir
(1.16.2)
結果
WA  
実行時間 -
コード長 377 bytes
コンパイル時間 1,176 ms
コンパイル使用メモリ 54,752 KB
実行使用メモリ 50,064 KB
最終ジャッジ日時 2023-08-29 23:09:07
合計ジャッジ時間 11,324 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 625 ms
49,160 KB
testcase_01 AC 624 ms
49,776 KB
testcase_02 AC 619 ms
49,156 KB
testcase_03 WA -
testcase_04 AC 623 ms
49,240 KB
testcase_05 WA -
testcase_06 AC 627 ms
49,332 KB
testcase_07 WA -
testcase_08 AC 629 ms
49,560 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 808 ms
49,260 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do
    def main do

        input = IO.binread(:all) |> String.trim_trailing("\n")

        n = String.to_integer(input)

        x =
            if rem(n, 2) == 0 do
                String.duplicate("1", div(n, 2))
            else
                String.duplicate("1", div(n, 2) - 1) <> "7"
            end |> String.to_integer

        IO.puts x

    end
end
0