結果

問題 No.677 10^Nの約数
ユーザー kept1994kept1994
提出日時 2021-09-29 02:54:40
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 531 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 87,076 KB
実行使用メモリ 79,736 KB
最終ジャッジ日時 2023-09-22 23:49:39
合計ジャッジ時間 8,349 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,124 KB
testcase_01 AC 71 ms
71,304 KB
testcase_02 AC 71 ms
71,380 KB
testcase_03 AC 72 ms
71,296 KB
testcase_04 AC 76 ms
71,360 KB
testcase_05 AC 72 ms
71,364 KB
testcase_06 AC 72 ms
71,408 KB
testcase_07 AC 76 ms
75,280 KB
testcase_08 AC 76 ms
75,364 KB
testcase_09 AC 75 ms
75,444 KB
testcase_10 AC 76 ms
75,400 KB
testcase_11 AC 80 ms
75,228 KB
testcase_12 AC 91 ms
75,292 KB
testcase_13 AC 126 ms
75,588 KB
testcase_14 AC 236 ms
75,404 KB
testcase_15 AC 585 ms
75,284 KB
testcase_16 AC 1,682 ms
75,444 KB
testcase_17 TLE -
testcase_18 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import sys

def main():
    N = int(input())
    def getDivisors(n: int):
        lowerDivisors, upperDivisors = [], []
        i = 1
        while i * i <= n: # sqrt(N)まで試し割りする。
            if n % i == 0:
                lowerDivisors.append(i)
                if i != n // i:
                    upperDivisors.append(n//i)
            i += 1
        return lowerDivisors + upperDivisors[::-1]

    print(*getDivisors(10 ** N),sep="\n")    
    return
if __name__ == '__main__':
    main()
0