結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:6: warning: possibly useless use of a variable in void context
Syntax OK

ソースコード

diff #

M = gets.to_i

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