結果

問題 No.736 約比
ユーザー LED
提出日時 2019-01-28 01:53:54
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 202 bytes
コンパイル時間 224 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,800 KB
最終ジャッジ日時 2024-10-01 11:33:10
合計ジャッジ時間 9,230 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 41 WA * 24
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:2: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

require 'prime'
n=gets.to_f
a=gets.chomp.split(/\s/).map(&:to_i)
pr=Prime.each(100).to_a.reverse
pr.each{|p|a.all?{|e|((e/p.to_f)==(e/p.to_f).to_i)} ? a.map!{|e|e/=p} : a }
puts a.map(&:to_i).join(":")
0