結果

問題 No.414 衝動
ユーザー 👑 yumechiyumechi
提出日時 2016-08-27 00:15:13
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 133 bytes
コンパイル時間 52 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,800 KB
最終ジャッジ日時 2024-04-26 04:16:43
合計ジャッジ時間 3,187 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
12,800 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 195 ms
12,672 KB
testcase_06 AC 198 ms
12,544 KB
testcase_07 AC 99 ms
12,416 KB
testcase_08 AC 154 ms
12,672 KB
testcase_09 WA -
testcase_10 AC 94 ms
12,288 KB
testcase_11 AC 98 ms
12,544 KB
testcase_12 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require 'prime'
i=gets.chomp.to_i
a=i.prime_division.map{|p,n|p*n}.flatten
puts i == 1 ? "1 1" : "#{a[0]} #{a.inject{|s,n|s*n}/a[0]}"
0