結果

問題 No.414 衝動
ユーザー katkkatk
提出日時 2016-09-03 03:34:36
言語 Elixir
(1.16.2)
結果
AC  
実行時間 638 ms / 1,000 ms
コード長 302 bytes
コンパイル時間 4,518 ms
コンパイル使用メモリ 61,904 KB
実行使用メモリ 55,520 KB
最終ジャッジ日時 2024-04-27 10:22:46
合計ジャッジ時間 14,151 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 633 ms
54,088 KB
testcase_01 AC 620 ms
54,816 KB
testcase_02 AC 629 ms
53,812 KB
testcase_03 AC 623 ms
54,896 KB
testcase_04 AC 617 ms
54,920 KB
testcase_05 AC 638 ms
53,864 KB
testcase_06 AC 632 ms
53,864 KB
testcase_07 AC 626 ms
53,836 KB
testcase_08 AC 623 ms
53,992 KB
testcase_09 AC 619 ms
53,740 KB
testcase_10 AC 618 ms
54,792 KB
testcase_11 AC 619 ms
55,520 KB
testcase_12 AC 613 ms
53,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do
    def main() do
        m = IO.gets("") |> Integer.parse |> elem(0)
        d1 = find_div(m, round(:math.sqrt(m)))
        d2 = round(m / d1)
        IO.puts("#{d1} #{d2}")
    end

    def find_div(n, t) when rem(n, t) == 0, do: t

    def find_div(n, t), do: find_div(n, t-1)
end
0