結果
問題 | No.736 約比 |
ユーザー |
![]() |
提出日時 | 2019-01-28 02:13:15 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 93 ms / 2,000 ms |
コード長 | 198 bytes |
コンパイル時間 | 283 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-10-01 12:27:18 |
合計ジャッジ時間 | 7,790 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 65 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
n=gets.to_fa=gets.chomp.split(/\s/).map(&:to_i)def ea(m,n)return m if n === 0ea(n, m%n)endloop dogcd = a.reduce{|s,e|ea(s,e)}a.map!{|e|e/=gcd}break if gcd === 1endputs a.join(":")