結果

問題 No.736 約比
ユーザー flippergo
提出日時 2021-01-04 23:56:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 219 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 81,980 KB
実行使用メモリ 52,480 KB
最終ジャッジ日時 2024-10-15 08:35:26
合計ジャッジ時間 4,525 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 65
権限があれば一括ダウンロードができます

ソースコード

diff #

def gcd(x,y):
    while y>0:
        x,y = y,x%y
    return x
N = int(input())
A = list(map(int,input().split()))
d = A[0]
for i in range(1,N):
    d = gcd(d,A[i])
A = [str(A[i]//d) for i in range(N)]
print(":".join(A))
0