結果
| 問題 |
No.736 約比
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-22 11:35:30 |
| 言語 | Swift (6.0.3) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 357 bytes |
| コンパイル時間 | 8,906 ms |
| コンパイル使用メモリ | 135,404 KB |
| 実行使用メモリ | 22,464 KB |
| 最終ジャッジ日時 | 2024-06-23 07:41:40 |
| 合計ジャッジ時間 | 15,461 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 64 |
ソースコード
let n = Int(readLine()!)
var a = readLine()!.split(separator: " ").map{Int($0)!}.sorted()
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: ":"))