def d(i): sumInt = 0 sumInt = sumInt + start if i % start == 0 for start in range(1,i) return sumInt print(str(sum([d(i) for i in range(1, 10**12)]))[-12:])
求1<=i<=10**12范围内所有d(i)的和的末12位,d(i)表示i的正约数的和,i为整数
时间: 2024-12-20 12:05:33
def d(i): sumInt = 0 sumInt = sumInt + start if i % start == 0 for start in range(1,i) return sumInt print(str(sum([d(i) for i in range(1, 10**12)]))[-12:])
求1<=i<=10**12范围内所有d(i)的和的末12位,d(i)表示i的正约数的和,i为整数