結果
問題 |
No.736 約比
|
ユーザー |
|
提出日時 | 2021-06-22 11:33:08 |
言語 | Swift (6.0.3) |
結果 |
TLE
|
実行時間 | - |
コード長 | 348 bytes |
コンパイル時間 | 4,364 ms |
コンパイル使用メモリ | 131,716 KB |
実行使用メモリ | 19,456 KB |
最終ジャッジ日時 | 2024-06-23 07:39:17 |
合計ジャッジ時間 | 11,134 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 -- * 64 |
ソースコード
let n = Int(readLine()!) var a = readLine()!.split(separator: " ").map{Int($0)!} var x = [1] for i in 2...a[0]{ if a[0] % i == 0{ x += [i] } } for i in a{ for j in x{ if i % j != 0{ x.remove(at: x.firstIndex(of: j)!) } } } a = a.map{$0 / x.max()!} print(a.map{String($0)}.joined(separator: ":"))