結果
| 問題 | No.736 約比 | 
| コンテスト | |
| ユーザー |  tak | 
| 提出日時 | 2019-02-03 18:29:05 | 
| 言語 | F# (F# 4.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 63 ms / 2,000 ms | 
| コード長 | 365 bytes | 
| コンパイル時間 | 9,236 ms | 
| コンパイル使用メモリ | 186,736 KB | 
| 実行使用メモリ | 32,224 KB | 
| 最終ジャッジ日時 | 2024-12-17 22:49:56 | 
| 合計ジャッジ時間 | 14,743 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 65 | 
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (238 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
open System
let rec gcd a b =
    if a < b then 
        gcd b a
    else
        match b with
        | 0L -> a
        | b -> gcd b (a%b)
let N = stdin.ReadLine()
let a = stdin.ReadLine().Split() |> Array.map int64
let ans = 
    let gcd' = a |> Array.reduce gcd
    let a' = a |> Array.map (fun x -> x / gcd')
    String.Join(":", a')
ans |> stdout.WriteLine
            
            
            
        