結果

問題 No.677 10^Nの約数
ユーザー Mario
提出日時 2018-06-03 14:46:07
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 522 bytes
コンパイル時間 78 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-30 09:21:37
合計ジャッジ時間 1,331 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 16 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import product
from operator import mul

def f1(n):
    fct = []
    b, e = 2, 0
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))

    return fct

def f2(fcts):
    l = []
    for f, n in fcts:
        l.append([f ** i for i in range(n+1)])
    return l

fcts = f2(f1(10 ** int(input())))
print(*sorted([mul(*i) for i in product(*fcts)]), sep="\n")
0