結果

問題 No.736 約比
ユーザー bellangeldindon
提出日時 2019-05-16 17:06:35
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 275 bytes
コンパイル時間 43 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-17 05:34:16
合計ジャッジ時間 2,581 ms
ジャッジサーバーID
(参考情報)
judge6 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 65
権限があれば一括ダウンロードができます

ソースコード

diff #

def euc(x, y):
	if y == 0: return x
	return euc(y, x%y)

N = int(raw_input())
a = map(int, raw_input().split())
tmp = a[0]
for i in range(1, N):
	tmp = euc(tmp, a[i])
a = map(lambda val: val/tmp, a)
ans = str(a[0])
for i in range(1, N):
	ans = ans + ':' + str(a[i])
print ans
0