結果

問題 No.414 衝動
ユーザー kkkk
提出日時 2016-10-31 11:43:41
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 207 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 18,976 KB
最終ジャッジ日時 2024-05-03 20:04:26
合計ジャッジ時間 3,416 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
18,848 KB
testcase_01 AC 90 ms
12,032 KB
testcase_02 AC 89 ms
12,160 KB
testcase_03 AC 179 ms
11,904 KB
testcase_04 AC 89 ms
12,160 KB
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

M = gets.to_i

    def get_divisor(d)
        for i in 2..d-1 do
            if d % i == 0
                return i
            end
        end
        1
    end
    d = get_divisor(M)
    puts "#{M/d} #{d}"
0