結果

問題 No.414 衝動
ユーザー finefine
提出日時 2016-08-26 22:24:14
言語 Ruby
(3.3.0)
結果
AC  
実行時間 198 ms / 1,000 ms
コード長 123 bytes
コンパイル時間 735 ms
コンパイル使用メモリ 11,516 KB
実行使用メモリ 15,580 KB
最終ジャッジ日時 2023-08-09 13:18:50
合計ジャッジ時間 4,424 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
15,404 KB
testcase_01 AC 94 ms
15,428 KB
testcase_02 AC 93 ms
15,332 KB
testcase_03 AC 198 ms
15,432 KB
testcase_04 AC 94 ms
15,372 KB
testcase_05 AC 198 ms
15,580 KB
testcase_06 AC 196 ms
15,452 KB
testcase_07 AC 94 ms
15,428 KB
testcase_08 AC 156 ms
15,428 KB
testcase_09 AC 197 ms
15,416 KB
testcase_10 AC 95 ms
15,240 KB
testcase_11 AC 96 ms
15,256 KB
testcase_12 AC 94 ms
15,312 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require 'prime'

m = gets.to_i
if m == 1
    x = 1
else
    x = Prime.prime_division(m).to_a[0][0]
end
puts "#{x} #{m / x}"
0