結果
問題 | No.677 10^Nの約数 |
ユーザー | takey |
提出日時 | 2018-05-25 02:16:35 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 547 bytes |
コンパイル時間 | 120 ms |
コンパイル使用メモリ | 10,808 KB |
実行使用メモリ | 12,664 KB |
最終ジャッジ日時 | 2023-09-11 03:19:32 |
合計ジャッジ時間 | 6,034 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
12,664 KB |
testcase_01 | AC | 16 ms
7,920 KB |
testcase_02 | AC | 17 ms
7,780 KB |
testcase_03 | AC | 16 ms
7,828 KB |
testcase_04 | AC | 16 ms
7,844 KB |
testcase_05 | AC | 16 ms
7,888 KB |
testcase_06 | AC | 17 ms
7,812 KB |
testcase_07 | AC | 17 ms
7,932 KB |
testcase_08 | AC | 21 ms
7,776 KB |
testcase_09 | AC | 28 ms
7,872 KB |
testcase_10 | AC | 65 ms
7,768 KB |
testcase_11 | AC | 138 ms
7,880 KB |
testcase_12 | AC | 458 ms
7,948 KB |
testcase_13 | AC | 1,230 ms
7,888 KB |
testcase_14 | TLE | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
ソースコード
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)) if i >= 5: i += 4 for i in range(len(ans_front)): print(ans_front[i]) for i in range(len(ans_back)): print(ans_back[i])