結果

問題 No.2480 Sequence Sum
ユーザー Kude
提出日時 2023-09-22 21:25:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 47 ms / 500 ms
コード長 324 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 58,112 KB
最終ジャッジ日時 2024-07-26 14:32:25
合計ジャッジ時間 1,488 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

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