結果

問題 No.677 10^Nの約数
ユーザー takeytakey
提出日時 2018-05-25 02:14:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 510 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 10,792 KB
実行使用メモリ 12,648 KB
最終ジャッジ日時 2023-09-11 03:19:16
合計ジャッジ時間 8,337 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
12,576 KB
testcase_01 AC 16 ms
7,848 KB
testcase_02 AC 16 ms
7,788 KB
testcase_03 AC 16 ms
7,844 KB
testcase_04 AC 16 ms
7,912 KB
testcase_05 AC 16 ms
7,768 KB
testcase_06 AC 17 ms
7,768 KB
testcase_07 AC 16 ms
7,844 KB
testcase_08 AC 19 ms
7,856 KB
testcase_09 AC 24 ms
7,916 KB
testcase_10 AC 49 ms
7,876 KB
testcase_11 AC 101 ms
7,788 KB
testcase_12 AC 352 ms
7,812 KB
testcase_13 AC 892 ms
7,872 KB
testcase_14 TLE -
testcase_15 TLE -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

if __name__ == "__main__":
    N = int(input())
    ans_front = []
    ans_back = []
    a = 10**N
    if a == 1:
        print(1)
        exit()
    
    for i in range(1, int(a/2)+1):
        if len(ans_back) > 0 and i >= ans_back[0]:
            break
        if a%i == 0:
            ans_front.append(i)
            if int(a/i) != i:
                ans_back.insert(0, int(a/i))
    for i in range(len(ans_front)):
        print(ans_front[i])
    for i in range(len(ans_back)):
        print(ans_back[i])
0