結果

問題 No.736 約比
ユーザー MaboyMaboy
提出日時 2021-06-22 11:59:32
言語 Swift
(5.10.0)
結果
WA  
実行時間 -
コード長 414 bytes
コンパイル時間 4,115 ms
コンパイル使用メモリ 186,724 KB
実行使用メモリ 18,388 KB
最終ジャッジ日時 2023-09-05 12:23:41
合計ジャッジ時間 12,037 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
18,388 KB
testcase_01 AC 6 ms
13,812 KB
testcase_02 AC 6 ms
13,228 KB
testcase_03 AC 6 ms
13,584 KB
testcase_04 AC 6 ms
13,588 KB
testcase_05 AC 7 ms
13,280 KB
testcase_06 AC 17 ms
13,332 KB
testcase_07 AC 7 ms
13,380 KB
testcase_08 AC 7 ms
13,336 KB
testcase_09 AC 6 ms
13,940 KB
testcase_10 AC 6 ms
13,284 KB
testcase_11 AC 6 ms
13,412 KB
testcase_12 AC 7 ms
13,296 KB
testcase_13 AC 6 ms
13,424 KB
testcase_14 AC 6 ms
13,332 KB
testcase_15 AC 6 ms
13,904 KB
testcase_16 AC 7 ms
13,580 KB
testcase_17 AC 7 ms
13,312 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 7 ms
13,684 KB
testcase_21 AC 7 ms
13,296 KB
testcase_22 AC 6 ms
13,408 KB
testcase_23 AC 28 ms
13,400 KB
testcase_24 AC 6 ms
13,516 KB
testcase_25 AC 6 ms
13,624 KB
testcase_26 AC 5 ms
13,576 KB
testcase_27 AC 6 ms
13,940 KB
testcase_28 AC 6 ms
13,536 KB
testcase_29 AC 6 ms
13,508 KB
testcase_30 AC 7 ms
13,388 KB
testcase_31 AC 6 ms
13,276 KB
testcase_32 AC 8 ms
13,480 KB
testcase_33 AC 6 ms
13,284 KB
testcase_34 AC 6 ms
13,484 KB
testcase_35 AC 6 ms
13,580 KB
testcase_36 AC 6 ms
13,548 KB
testcase_37 AC 6 ms
13,340 KB
testcase_38 AC 6 ms
13,284 KB
testcase_39 AC 6 ms
13,860 KB
testcase_40 AC 6 ms
13,284 KB
testcase_41 AC 7 ms
13,424 KB
testcase_42 AC 1,541 ms
13,560 KB
testcase_43 AC 557 ms
13,684 KB
testcase_44 AC 172 ms
13,536 KB
testcase_45 AC 479 ms
13,876 KB
testcase_46 TLE -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
testcase_53 -- -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
testcase_59 -- -
testcase_60 -- -
testcase_61 -- -
testcase_62 -- -
testcase_63 -- -
testcase_64 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import Foundation
let n = Int(readLine()!)
var a = readLine()!.split(separator: " ").map{Int($0)!}
var x = [1]
let m = a.min()!
for i in 2...Int(sqrt(Double(m))) + 1{
    if m % i == 0{
        x += [i,m / i]
    }
}
x.sort()
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: ":"))
0