結果
| 問題 | No.677 10^Nの約数 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-06-03 14:48:07 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 550 bytes | 
| コンパイル時間 | 125 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-06-30 09:22:01 | 
| 合計ジャッジ時間 | 1,826 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 16 WA * 1 | 
ソースコード
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
n = int(input())
if n == 0:
    print(0)
else:
    print(*sorted([mul(*i) for i in product(*f2(f1(10 ** n)))]), sep="\n")
            
            
            
        