Problem:


Score : 400 points

Problem Statement

For a positive integer X, let f(X) be the number of positive divisors of X.

Given a positive integer N, find \sum_{K=1}^N K\times f(K).

Constraints

1 \leq N \leq 10^7

Input

Input is given from Standard Input in the following format:

N

Output

Print the value \sum_{K=1}^N K\times f(K).

Sample Input 1

4

Sample Output 1

23

We have f(1)=1, f(2)=2, f(3)=2, and f(4)=3, so the answer is 1\times 1 + 2\times 2 + 3\times 2 + 4\times 3 =23.

Sample Input 2

100

Sample Output 2

26879

Sample Input 3

10000000

Sample Output 3

838627288460105

Watch out for overflows.



Sample input:
4


Sample output:
23

Submission status: Runtime Error

Solution code:
N=int(input())
import math
import sympy

answer=0
for n in range(1,N+1):
    suuji=sympy.divisor_count(n)
    answer+=suuji*n
print(answer)

Submission status: Runtime Error

Solution code:
import sympy

def divisors_count(n):
    #lower_divisors , upper_divisors = [], []
    i = 1
    c = 0
    while i*i <= n:
        if n % i == 0:
            #lower_divisors.append(i)
            c += 1
            if i != n // i:
                #upper_divisors.append(n//i)
                c += 1
        i += 1
    #return lower_divisors + upper_divisors[::-1]
    return c

N = int(input())
ans = 0
for i in range(1, N+1):
    ans += i * divisors_count(i)
print(ans)

Submission status: Runtime Error

Solution code:
import sympy




n = int(input())




result = 0
for tmp in range(1, n + 1):
    result += tmp * len(sympy.divisors(tmp))

print(result)

Submission status: Runtime Error

Solution code:
import sympy




n = int(input())




result = 0
for tmp in range(1, n + 1):
    result += tmp * len(sympy.divisors(tmp))
    print(tmp, result)

print(result)

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())

X = [0]*(N+1)

for i in range(1,N+1):
    X[i] = len(sympy.divisors(i))

ans = 0
for i in range(1,N+1):
    # print(i,X[i])
    ans += i * X[i]
    
print(ans)

Submission status: Runtime Error

Solution code:
import sympy
n=int(input())
a=0
for i in range(1,n+1):
  
  a+=sympy.divisor_count(i)
print(a)

Submission status: Runtime Error

Solution code:
import sympy

N = int(input())
ans = []
for i in range(1,N+1):
    q = len(sympy.divisors(i))
    ans.append(q*i)
    
print(sum(ans))

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())

ans = []
for K in range(1, N+1):
    f = sympy.divisor_count(K)
    ans.append(K*f)
print(sum(ans))

Submission status: Runtime Error

Solution code:
import sympy

k = int(input().rstrip())

ans = 0
for i in range(1, k+1):
    ans += len(sympy.divisors(i)) * i

print(ans)

Submission status: Runtime Error

Solution code:
import sympy
n = int(input())
ans = 0
for i in range(n):
    ans += (i+1) * sympy.divisor_count(i+1)
    
print(ans)

Submission status: Runtime Error

Solution code:
def sum_div(n):
     res=[1]
     for i in range(2,n:
          if n% i ==0:
                res.append(i*n)
return sum(res)
if __name__=="__main__":
main()
n=input()
r=sum_div(n)
print(r)

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())
count = 0
for i in range(N+1):
    count += i * sympy.divisor_count(i)

print(count)

Submission status: Runtime Error

Solution code:
import sympy
n = int(input())
a = 0
for j in range(1,n+1):
    a += j * len(sympy.divisors(j))
print(a)

Submission status: Runtime Error

Solution code:
import sympy

N = int(input())

ans = 0
for i in range(1, N+1):
    ans += i*len(sympy.divisors(i))
print(ans)

Submission status: Runtime Error

Solution code:
import sympy

n=int(input())

sum=0

for i in range(n):
	num=len(sympy.divisors(i+1))
	sum+=(i+1)*num

print(sum)

Submission status: Runtime Error

Solution code:
import sympy

N=int(input())

ans = 0
for i in range (1, N+1):
    ans += i * sympy.divisor_count(i)

print(ans)

Submission status: Runtime Error

Solution code:
import sympy

n = int(input())
ans = 0
for i in range(1, n+1):
    ans += i * sympy.divisor_count(i)

print(ans)

Submission status: Runtime Error

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict, deque

# import fractions

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)
# lcm = lambda x, y: (x * y) // fractions.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N, M, K = il()
    A = il()
    SA = [0] * (N + 1)
    for n in range(N):
        SA[n + 1] = A[n] + SA[n]
    B = il()
    SB = [0] * (M + 1)
    for m in range(M):
        SB[m + 1] = B[m] + SB[m]
        
    ret = 0
    for n in range(N+1):
        for m in range(M+1):
            if SA[n] + SB[m] <= K:
                ret = max(ret, n + m)
    print(ret)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())

a = 0



if 1 <= N <= 10**7:
    for i in range(1,N+1):
        fN = sympy.divisor_count(i)
        a += i * fN  

print(a)

Submission status: Runtime Error

Solution code:
import sympy

N = int(input())

sigma = 0
for k in range(1,N+1):
    sigma += k * sympy.divisors(k)

print(sigma)

Submission status: Runtime Error

Solution code:
import sympy
n = int(input())
ans = 0
for i in range(1,n+1):
    ans += i*sympy.divisor_count(i)
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
import sympy

ans=0
for i in range(n+1):
  ans+=i*len(sympy.divisors(i))

print(ans)

Submission status: Runtime Error

Solution code:
import sympy

N = int(input())
ans = 0
for i in range(1, N):
    ans += i*sympy.divisor_count(i)
print(ans)

Submission status: Runtime Error

Solution code:
import sympy

N = int(input())
ans = 0
for i in range(1, N):
    ans += i*sympy.divisor_count(i)
print(ans)

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())
ans = 0
for n in range(1, N+1):
    data = sympy.divisors(n)
    ans += len(data) * n

print(ans)

Submission status: Runtime Error

Solution code:
# coding: utf-8
import sympy
n = int(input())
ans = 0
for i in range(n):
    ans = ans + (1 + i) * sympy.divisor_count(i+1)
print(ans)

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())
ans = 0
for i in range(1,N+1):
    ans += i*sympy.divisor_count(i)
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
import sympy
ans=0
for i in range(1,n+1):
    ans+=i*sympy.divisor_count(i)
print(ans)

Submission status: Runtime Error

Solution code:
import sympy
a = int(input())
c = 0
for i in range (0,a+1):
    b = sympy.divisors(i)
    c = c + i * len(b)
print(c)

Submission status: Runtime Error

Solution code:
import sympy

n = int(input())

ans = 0

for i in range(1, n+1):
    c = sympy.divisor_count(i)
    ans += i * c

print(ans)

Submission status: Runtime Error

Solution code:
import math


def divisor_count(n):
    num = 0
    for i in range(1, int(math.sqrt(n) + 1e-9) + 1):
        if n % i == 0:
            num += 1
            if n != i**2:
                num += 1
    return num

def divisor_sum(n):
    if n < 1:
        return 0
    return n*divisor_count(n) + divisor_sum(n-1)


N = int(input())
print(divisor_sum(N))

Submission status: Runtime Error

Solution code:
import sympy
import sys
sys.setrecursionlimit(10**9)

N = int(input())
div = 0
for i in range(1,N+1):
    f = sympy.divisor_count(i)
    div += f*i

print(div)

Submission status: Runtime Error

Solution code:
import sympy
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
n = input()
s = 0
for nn in range(int(n)):
    s += (nn+1)*(len(make_divisors(int(nn+1))))
print(s)

Submission status: Runtime Error

Solution code:
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return sorted(divisors)

for _ in range(2):
N = int(input().rstrip())
d = {}
answer = 0
for a in range(1, N+1):
    answer += a * len(make_divisors(a))
print(answer)

Submission status: Runtime Error

Solution code:
import math


def divisor_count(n):
    num = 0
    for i in range(1, int(math.sqrt(n) + 1e-9) + 1):
        if n % i == 0:
            num += 1
            if n != i**2:
                num += 1
    return num

def divisor_sum(n):
    if n < 1:
        return 0
    return n*divisor_count(n) + divisor_sum(n-1)


n = int(input())
print(divisor_sum(n))

Submission status: Runtime Error

Solution code:
N = int(input())
import sympy
a = 0
def f(x):
    if x == 1:
        return x
    else:
        return sympy.divisor_count(x)*x

for i in range(1,N+1):
    a += f(i)

print(a)

Submission status: Runtime Error

Solution code:
import sympy
N=int(input())
s=0
ans=0
for k in range(1,N+1):
    s=len(sympy.divisors(k))
    ans+=k*s
    
print(ans)

Submission status: Runtime Error

Solution code:
import sympy

def func(k):
    i = 1
    cnt = 0
    if k == 1:
        return 1
    while i*i <= k:
        if k % i == 0:
            cnt += 1
            if i != k // i:
                cnt += 1
        i += 1
    return cnt

n = int(input())
sum = 0
for i in range(1, n + 1):
    # sum += i * sympy.divisor_count(i)
    sum += i * func(i)

print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
import sympy
num = 0
for i in range(1,N+1):
    num += i*sympy.divisor_count(i)
print(num)

Submission status: Runtime Error

Solution code:
import sympy
n = int(input())

ans = 0
for i in range(1,n+1):
    # print(sympy.divisors(i))
    # print(len(sympy.divisors(i)))
    ans += i * len(sympy.divisors(i))

print(ans)

Submission status: Runtime Error

Solution code:
N = int(input().rstrip())
d = {}
answer = 0
for a in range(1, N+1):
    answer += a * len(make_divisors(a))
print(answer)

Submission status: Runtime Error

Solution code:
def sum_div(num):
     res=[1]
     for i in range(2,num):
          if num% i ==0:
                res.append(i*num)
return sum(res)
if __name__=="__main__":
main()
n=input()
r=sum_div(n)
print(r)

Submission status: Runtime Error

Solution code:
import sympy
n = input()
s = 0
for nn in range(int(n)):
    s += (nn+1)*(len(sympy.divisors(int(nn+1))))
print(s)

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())
ans = 0
for i in range(1,N+1):
    ans += i*sympy.divisor_count(i)
print(ans)

Submission status: Runtime Error

Solution code:
import sympy

N = int(input())
tmp = 0
for i in range(1, N + 1):
    tmp += i * (sympy.divisor_count(i))

print(tmp)

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())
a = 0
def f(x):
    if x == 1:
        return x
    else:
        return sympy.divisor_count(x)*x

for i in range(1,N+1):
    a += f(i)

print(a)

Submission status: Runtime Error

Solution code:
import sympy
for i in range(1,n+1):
    count += sympy.divisor_count(i)*i
print(count)

Submission status: Runtime Error

Solution code:
import sympy

N = int(input())
ans = 0

for i in range(N):
    ans += (i+1)*sympy.divisor_count(i+1)

print(ans)

Submission status: Runtime Error

Solution code:
import sympy

n = int(input())
c = 0
for i in range(1, n+1):
  c += i * sympy.divisor_count(i)

print(c)

Submission status: Runtime Error

Solution code:
import numpy as np
import sympy
n=int(input())
a=[(sympy.divisor_count(i)*i) for i in range(1,n+1)]
print(np.sum(a))

Submission status: Runtime Error

Solution code:
import sympy

n =int(input())
ans = 0
for i in range(1,n+1,1):
    ans += i*len(sympy.divisors(i))


print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())
count=0
import sympy
for i in range(1,N+1):
    a=sympy.divisor_count(i)
    b=i*a
    count+=b
print(count)

Submission status: Runtime Error

Solution code:
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
n = int(input())
count = 0
for i in range(1,n+1):
    count += make_divisors(i)*i
print(count)

Submission status: Runtime Error

Solution code:
import sympy
def make_divisors(n):
    a=sympy.divisors(n)
    return len(a)
 
def main():
    n=int(input())
 
    sum_data=0
 
    for i in range(1,n+1):
        x=make_divisors(i)
        sum_data=x*i+sum_data
 
    print(sum_data)
 
if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import sympy
n = int(input())
total = 0
for i in range(1, n + 1):
    total += i * sympy.divisor_count(i)
print(total)

Submission status: Runtime Error

Solution code:
import sympy

n = int(input())
ans = 0

for i in range(1, n + 1):
    ans += i*sympy.divisor_count(i)

print(ans)

Submission status: Runtime Error

Solution code:
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

N = int(input())
sum = 0
for i in range(N+1):
    sum+=i*len(sympy.divisors(i))
print(sum)

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())

a = 0

for i in range(1,N+1):
    fN = sympy.divisor_count(i)
    a += i * fN
    
    
print(a)

Submission status: Runtime Error

Solution code:
import sympy

N = int(input())
sum =0
for i in range (1,N+1):
    sum += i*sympy.divisor_count(i)

print(sum)

Submission status: Runtime Error

Solution code:
import sympy
n=int(input())
ans=0
for i in range(1,n+1):
    ans=ans+sympy.divisor_count(i)*i
print(ans)

Submission status: Runtime Error

Solution code:
import sympy

N=int(input())
num=0
for i in range(1, N+1):
    yakusuu= sympy.divisor_count(N)
    num    =num + i*yakusuu

print(num)

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())
ans = 0
for i in range(1,N+1):
    ans += i*sympy.divisor(i)
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
import sympy

count = 0
for i in range(1, (N+1)):
    count += i * len(sympy.divisors(i))

print(count)

Submission status: Runtime Error

Solution code:
N = int(input())
print(sum(i * my_func(i) for i in range(1, N + 1)))

Submission status: Runtime Error

Solution code:
def sum_div(num):
     res=[1]
     for i in range(2,num):
          if num% i ==0:
                res.append(i*num)
return sum(res)
if __name__=="__main__":
n=input()
r=sum_div(n)
print(r)

Submission status: Runtime Error

Solution code:
import sympy as sp

N = int(input())
ans = 0
for i in range(1, N+1):
    ans += i * sp.divisor_count(i)

print(ans)

Submission status: Runtime Error

Solution code:
import sympy
n=int(input())
ans=0
for i in range(1,n+1):
    ans=ans+sympy.divisors(i)*i
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np
n = int(input())

prime = [2]

n_max = 1e7+1
def is_prime(n):
    m = int(np.sqrt(n_max))+1
    # m = n

    for i in range(3, m, 2):
        flag = True
        for j in prime:
            if i % j == 0:
                flag = False
                break
        if flag:
            prime.append(i)

is_prime(n)

nums = []

# ans = 0

def num_s(n):
    ans = 0
    # for i in range(1, int(n_max)):
    for i in range(1, int(n+1)):
        inow = i
        num = 1
        for j in prime:
            tmp = 1
            while i % j==0:
                tmp += 1
                i /= j
            num *= tmp
        ans += num*inow
        nums.append(num)
        
    return ans
            
ans = int(num_s(n))
# print(nums)
print(ans)

Submission status: Runtime Error

Solution code:
import sympy
import sys
sys.setrecursionlimit(10**6)

N = int(input())
div = 0
for i in range(1,N+1):
    f = sympy.divisor_count(i)
    div += f*i

print(div)

Submission status: Runtime Error

Solution code:
import sympy
ans = 0
N = int(input())

for i in range(N):
    ans += (i+1)*sympy.divisor_count(i+1)

print(ans)

Submission status: Runtime Error

Solution code:
from collections import deque

N,M,K = map(int,input().split())
Ali = list(map(int,input().split()))
Bli = list(map(int,input().split()))

q = deque()
q.append([0,0,0])#(time,a,b)
r = 0
k = 0

while len(q) > 0:
  time,a,b = q.popleft()
  
  r = max(r,a+b)
    
  
  if a<N:
    if k == [a+1,b]:
      continue
    if Ali[a] <= K-time:
      q.append([time+Ali[a],a+1,b])
    
  if b<M:
    if Bli[b] <= K-time:
      q.append([time+Bli[b],a,b+1])
    
  k = [a,b+1]
    
print(r)

Submission status: Runtime Error

Solution code:
import sympy
sympy.divisors(10**9)


def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

n =int(input())
ans = 0
for i in range(1,n+1,1):
    ans += i*len(make_divisors(i))


print(ans)

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())
count = 0
for i in range(N+1):
    count += (i * len(sympy.divisors(i)))

print(count)

Submission status: Runtime Error

Solution code:
#!usr/bin/env pypy3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import copy
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)

def get_sieve_of_eratosthenes(n):
    if not isinstance(n, int):
        raise TypeError('n is int type.')
    if n < 2:
        raise ValueError('n is more than 2')
    prime = [2]
    limit = int(n**0.5)
    data = [i + 1 for i in range(2, n, 2)]
    while True:
        p = data[0]
        if limit <= p:
            return prime + data
        prime.append(p)
        data = [e for e in data if e % p != 0]


def main():
    N = I()
    era = get_sieve_of_eratosthenes(N+1)
    ans = 0
    divsdic = [None] * (N + 1)

    def get_divisor_count(k):
        n = k
        d = defaultdict(int)
        while k != 0:
            if divsdic[k] is not None:
                for (k, v) in divsdic[k].items():
                    d[k] += v
                divsdic[n] = copy.copy(d)
                return copy.copy(d)
            for i in era:
                if k % i == 0:
                    k //= i
                    d[i] += 1
                    break
            else:
                break
        divsdic[n] = copy.copy(d)
        return d

    for i in range(1, N + 1):
        d = get_divisor_count(i)
        tmp = 1
        for v in d.values():
            tmp *= v + 1
        ans += tmp * i

    print(ans)


main()

Submission status: Runtime Error

Solution code:
import sympy
def make_divisors(n):
    a=sympy.divisors(n)
    return len(a)

def main():
    n=int(input())

    sum_data=0

    for i in range(1,n+1):
        x=make_divisors(i)
        sum_data=x*i+sum_data

    print(sum_data)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import sympy
a=input()
b=list(a)
x=int(a[0])
c=0
d=0
e=0
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

for i in range(1,x+1):
    f=make_divisors(i)
    number=len(f)

    d=d+(i*int(number))

print(d)

Submission status: Runtime Error

Solution code:
import sympy

n = int(input())

answer = 0
for i in range(1, n+1):
    yakusus = sympy.divisors(i)
    tmp = i * len(yakusus)
    answer += tmp

print(answer)

Submission status: Runtime Error

Solution code:
N = int(input())
total = 0

import sympy


for i in range(1,N+1):
    total += sympy.divisor_count(i)*i
print(total)

Submission status: Runtime Error

Solution code:
import sympy

N = int(input())
ans = 0

for i in range(1, N+1):
    ans += len(sympy.divisors(i))

print(ans)

Submission status: Runtime Error

Solution code:
import sympy
n = int(input())
ans = 0
for i in range(n):
  ans += (i+1) * len(sympy.divisors(i+1))
print(ans)

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())
sum1 = 0
for i in range(1,N+1):
    sum1 += i*len(sympy.divisors(i))
print(sum1)

Submission status: Runtime Error

Solution code:
def sum_div(num):
     res=[1]
     for i in range(2,num):
          if num% i ==0:
                res.append(i*num)
return sum(res)
n=input()
r=sum_div(n)
print(r)

Submission status: Runtime Error

Solution code:
import sympy
import sys
sys.setrecursionlimit(10**9)

N = int(input())
div = []
for i in range(1,N+1):
    f = sympy.divisor_count(i)
    div.append(f*i)

print(sum(div))

Submission status: Runtime Error

Solution code:
n = int(input())
ans = 0
for i in range(n):
  ans += (i+1) * len(sympy.divisors(i+1))
print(ans)

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())
#ans = 0
#for i in range(1,N+1):
    #ans += (i*len(sympy.divisors(i)))
ans = sum([(i+1)*len(sympy.divisors(i+1)) for i in range(N)])
print(ans)

Submission status: Runtime Error

Solution code:
import sympy
n = int(input())
a = 0
for i in range(1,n+1):
    a += i*sympy.divisor_count(i)
print(a)

Submission status: Runtime Error

Solution code:
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
n=int(input())
li=[]
f=make_divisors(n)
for i in range(1,n+1):
    li.append(i*f[i-1])
print(sum(li))

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())
print(sum([i * len(sympy.divisors(N)) for i in range(1, N+1)]))

Submission status: Runtime Error

Solution code:
import sympy

n = int(input())
ans = 0
for i in range(1, n+1):
    ans += i * sympy.divisor_count(i)

print(ans)

Submission status: Runtime Error

Solution code:

def sum_div(num):
     divisors=[1]
     for i in range(2,num):
          if num% i ==0:
                res.append(i*num)
return sum(res)
n=input()
r=sum_div(n)
print(r)

Submission status: Runtime Error

Solution code:
import sympy
sympy.divisors(10**9)


def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

n =int(input())
ans = 0
for i in range(1,n,1):
    ans += i*len(make_divisors(i))

print(ans)

Submission status: Runtime Error

Solution code:
import sympy
import sys
sys.setrecursionlimit(10**6)

N = int(input())
div = []
for i in range(1,N+1):
    f = sympy.divisor_count(i)
    div.append(f*i)

print(sum(div))

Submission status: Runtime Error

Solution code:
import sympy
n=int(input())
ans=0
for i in range(n):
    ans+=(i+1)*(sympy.divisor_count(i+1))
print(ans)

Submission status: Runtime Error

Solution code:
import sympy
n=int(input())
ans=0
for i in range(1,n+1):
  ans+=i*sympy.divisor_count(i)
print(ans)

Submission status: Runtime Error

Solution code:
INF = 10 ** 7
is_prime = [1] * INF

def eratorasu():
    is_prime[0] = 0
    is_prime[1] = 0
    for i in range(2, INF):
        if is_prime[i] == 0:
            continue
        for j in range(i * 2, INF, i):
            is_prime[j] = 0
    return

eratorasu()
N = int(input())
dp = [0] * (N + 1)
dp[1] = 1
for i in range(2, N + 1):
    if is_prime[i] == 1:
        dp[i] += 2
    else:
        if i % 2 == 0:
            if is_prime[i % 2] == 1:
                dp[i] += 1
            else:
                dp[i] += dp[i // 2] + 1
        else:
            dp[i] += 1
total = 0
for i in range(1, N + 1):
    total += i * dp[i]

print(total)

Submission status: Runtime Error

Solution code:
def make_divisors(n):
    cnt = 0
    i = 1
    while i*i <= n:
        if n % i == 0:
            cnt += 1
            if i != n // i:
                cnt += 1
        i += 1
    return cnt

n = int(input())
ans = 0
for i in range(1, n+1):
  ans += i * len(make_divisors(i))
print(ans)

Submission status: Runtime Error

Solution code:
import sys
import sympy

if __name__ == '__main__':
    n = int(sys.stdin.readline())
    x = 0
    for i in range(1,n+1):
        x += i*len(sympy.divisors(i))
    print(x)

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())
ans = 0
for i in range(0, N+1):
  F = sympy.divisors(i)
  ans += i * len(F)
print(ans)

Submission status: Runtime Error

Solution code:
import sympy
a=input()
b=list(a)
x=int(a[0])
c=0
d=0
e=0

for i in range(1,x+1):
    c=sympy.divisors(i)
    e=len(c)

    d=d+(i*int(e))

print(d)

Submission status: Runtime Error

Solution code:
N=int(input())
num=0
for i in range(1, N+1):
    yakusuu= divisor_num(i)
    num=num + i*yakusuu
            
    print(num)
        
def divisor_num(n):
    a = 1
    for _, x in factorization(n):
        a *= x + 1
    return a

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 27 21:14:26 2020

@author: naoki
"""
import sympy

N = int(input())
count = 0 

for i in range(1,N+1):
    count += i*sympy.divisor_count(i)
print(count)

Submission status: Runtime Error

Solution code:

import sympy
N = int(input())

out=0
for i in range(1,N+1):
    out+=i * len(sympy.divisors(i))
print(out)

Submission status: Runtime Error

Solution code:
a=input().split(" ")
b=input().split(" ")
c=input().split(" ")
d=0
e=0
f=0
count=0
while int(a[2])>=e and int(a[2])>=int(b[0]):
    if d<int(a[0]):
        e=e+int(b[d])
        d=d+1
        count+=1
    elif f<int(a[1]) and d>=3:
        e=e+int(c[f])
        f=f+1
        count+=1
    elif d>int(a[0]) and f>int(a[1]):
        break
    else:
        break

print(count)

Submission status: Runtime Error

Solution code:
import sympy
n=int(input())
li=[]
f=[sympy.divisor_count(i) for i in range(1,n+1)]

for i in range(1,n+1):
    li.append(i*f[i-1])
print(sum(li))

Submission status: Runtime Error

Solution code:
N = int(input())
if N == 1:
    print(1)
elif N == 2:
    print(5)
elif N == 3:
    print(11)
else:
    ans = N*(N+1)-1
    for i in range(2,N//2):
        t = N//i
        ans += i*(t*(t+1)//2-1)
        
print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())
num=0
for i in range(1, N+1):
	yakusuu= divisor_num(i)
    num=num + i*yakusuu
        
print(num)
         
def divisor_num(n):
    a = 1
    for _, x in factorization(n):
        a *= x + 1
    return a

Submission status: Runtime Error

Solution code:
N=int(input())
from collection import defaultdict
def prime_factorization_1(num):
    if num <= 1:
        return False
    else:
        num_sqrt = math.floor(math.sqrt(num))
        prime_list = make_prime_list_2(num_sqrt)

        dict_counter = defaultdict(int)
        for prime in prime_list:
            while num % prime == 0:
                dict_counter[prime] += 1
                num //= prime
        if num != 1:
            dict_counter[num] += 1

        dict_counter = dict(dict_counter)

        return dict_counter
ans=0
for i in range(1,N+1):
  ans+=prime_factorization_1(i)*i
print(ans)

Submission status: Runtime Error

Solution code:
import sympy

# def func(k):
#     i = 1
#     cnt = 1
#     if k == 1:
#         return cnt
#     while i < k:
#         if k % i == 0:
#             cnt += 1
#             if i != n // i:
#                 cnt += 1
#         i += 1
#     return cnt

n = int(input())
sum = 0
for i in range(1, n + 1):
    sum += i * sympy.divisor_count(i)

print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
#ans = 0
#for i in range(1,N+1):
    #ans += (i*len(sympy.divisors(i)))
ans = sum([(i+1)*len(sympy.divisors(i+1)) for i in range(N)])
print(ans)

Submission status: Runtime Error

Solution code:
import sympy

N = int(input())
ans = 0
for n in range(1,N+1):
    ans += n * len(sympy.divisors(n))
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())

import sympy
ans = 0
for i in range(1, n+1):
    ans += i * sympy.divisor_count(i)
    
print(ans)

Submission status: Runtime Error

Solution code:
import sympy

N = int(input())
ans = 0
for n in range(1,N+1):
    ans += n * len(sympy.divisors(n))
    print(n,len(sympy.divisors(n)))
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())

import sympy
sympy.divisors(10**9)

def m(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return len(lower_divisors) + len(upper_divisors[::-1])

ans = 0
for i in range(1, n+1):
    ans += i * m(i)
print(ans)

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())

ans = 0
for i in range(1, N + 1):
    ans += i * len(sympy.divisors(i))
print(ans)

Submission status: Runtime Error

Solution code:
import math
k = int(input())
an = 0
for i in range(1,k+1):
    li = []
    cnt = 1
    num = i
    if i == 1:
        lis.append(1)
    else:
        for j in range(2,math.ceil(math.sqrt(i))+1):
            while num % j == 0:
                cnt += 1
                num //= j
            if cnt != 1:
                li.append(cnt)
                cnt = 1
        if num != 1:
            li.append(2)
        ans = 1
        for nu in li:
            ans *= nu
        an += ans
print(an)

Submission status: Runtime Error

Solution code:
import sympy


def make_divisors(n):
    lower_divisors, upper_divisors = [], []
    i = 1
    while i * i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n // i)
        i += 1
    return lower_divisors + upper_divisors[::-1]


n = int(input())

total = 0
for num in range(1, n+1, 1):
    total += num * len(sympy.divisors(num))
    
print(total)

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())

ans = 0
for i in range(1,N+1):
    ans +=  i*len(sympy.divisors(i))

print(ans)