結果

問題 No.2480 Sequence Sum
ユーザー KudeKude
提出日時 2023-09-22 21:25:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 78 ms / 500 ms
コード長 324 bytes
コンパイル時間 699 ms
コンパイル使用メモリ 87,196 KB
実行使用メモリ 75,848 KB
最終ジャッジ日時 2023-10-04 12:33:00
合計ジャッジ時間 2,260 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,324 KB
testcase_01 AC 73 ms
71,612 KB
testcase_02 AC 75 ms
75,468 KB
testcase_03 AC 74 ms
75,648 KB
testcase_04 AC 73 ms
75,280 KB
testcase_05 AC 75 ms
75,608 KB
testcase_06 AC 76 ms
75,396 KB
testcase_07 AC 74 ms
75,412 KB
testcase_08 AC 74 ms
75,440 KB
testcase_09 AC 74 ms
75,244 KB
testcase_10 AC 76 ms
75,400 KB
testcase_11 AC 74 ms
75,528 KB
testcase_12 AC 74 ms
75,276 KB
testcase_13 AC 76 ms
75,528 KB
testcase_14 AC 78 ms
75,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def divisors(x):
    d = 1
    res1 = []
    res2 = []
    while d * d < x:
        if x % d == 0:
            res1.append(d)
            res2.append(x // d)
        d += 1
    if d * d == x:
        res1.append(d)
    while res2:
        res1.append(res2.pop())
    return res1

n = int(input())
print(n - len(divisors(n)))
0