結果

問題 No.736 約比
ユーザー akiraarika932
提出日時 2019-02-04 18:45:12
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 911 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 22,912 KB
最終ジャッジ日時 2024-12-25 23:27:33
合計ジャッジ時間 184,109 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 TLE * 59
権限があれば一括ダウンロードができます

ソースコード

diff #

import math,sys
element_count = int(input())
number = input()
number = number.split()
reduction = []
greatest_common_measure = 0
ans_list = []
for i in range(element_count):
    figure = int(number[i])
    for i in range(figure):
        j = i + 1
        if figure % j == 0:
            reduction.append(j)
        j = 0
math_only_list = list(set(reduction))
math_only_list = sorted(math_only_list)
math_only_list.reverse()
count = len(math_only_list)
for i in range(count):
    if reduction.count(math_only_list[i]) == element_count:
        greatest_common_measure = int(math_only_list[i])
        break
for i in range(element_count):
    figure = int(number[i])
    ans = math.floor(figure / greatest_common_measure)
    ans = str(ans) + ':'
    ans_list.append(ans)
for i in range(element_count):
    if i == element_count - 1:
        ans_list[i] = ans_list[i].strip(':')
    sys.stdout.write(ans_list[i])
0