結果

問題 No.2480 Sequence Sum
ユーザー ntudantuda
提出日時 2023-09-23 14:18:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 78 ms / 500 ms
コード長 347 bytes
コンパイル時間 358 ms
コンパイル使用メモリ 87,268 KB
実行使用メモリ 75,796 KB
最終ジャッジ日時 2023-10-04 12:35:13
合計ジャッジ時間 2,186 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,324 KB
testcase_01 AC 68 ms
71,252 KB
testcase_02 AC 71 ms
75,532 KB
testcase_03 AC 78 ms
75,576 KB
testcase_04 AC 72 ms
75,536 KB
testcase_05 AC 71 ms
75,584 KB
testcase_06 AC 73 ms
75,532 KB
testcase_07 AC 73 ms
75,536 KB
testcase_08 AC 72 ms
75,608 KB
testcase_09 AC 74 ms
75,596 KB
testcase_10 AC 70 ms
75,500 KB
testcase_11 AC 71 ms
75,716 KB
testcase_12 AC 73 ms
75,604 KB
testcase_13 AC 75 ms
75,652 KB
testcase_14 AC 74 ms
75,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def make_divisors(n):
    divisors = []  #必要に応じてsetにしても良いかも
    i = 1
    while i ** 2 <= n:
        if n % i == 0:
            divisors.append(i)
            if i ** 2 != n:
                divisors.append(n//i)
        i += 1
    divisors.sort()
    return divisors

N = int(input())
print(N - len(make_divisors(N)))
0