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.

Solution (Python):

"""

import numpy as np
i4 = np.int32
i8 = np.int64

def nmul(i, j):
    count = 2
    while j % i == 0:
        j //= i
        count += 1
    return count


def main(in_file):
    stdin = open(in_file)
    N = int(stdin.readline())

    a = np.ones(N + 1, i8)
    for i in range(2, N + 1):
        if a[i] == 1:
            j = 1
            while i * j <= N:
                a[i * j] *= nmul(i, j)
                j += 1

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

def main2():
    main('/dev/stdin')
"""
import os, sys
p = os.path.dirname(__file__)
pymain = os.path.join(p, "a.out")
if len(sys.argv) == 1:
    import subprocess
    if p == "":
        pymain = "./" + pymain
    subprocess.call(pymain)
else:
    import gzip, base64, stat
    gz = b'H4sIANSmU18C/+19C3xU1bX3mUkmmQhkhncIKCMOkKgkGZJAEsEmJKNnJEAkAfGBkyEzIQOTTJxMIFir2ATKGEaxUi+9tS2ffVxr7ZW2Xj+lXg0P0XL7QFqrFShgQc8QkFAQsUjmrrX3PjN7Ts4JIdL+vt/362jYZ/3P3muvtfbaz3P22Y/YK2/T63SC/EsSbhWQqppM6VKGv7IpFgWwIiEN/p0oXCekAJ3MxVOGF3SJoTGWD01XpKe0MpwgJIY6LjQI2j/j4sRQECyxdChr1t0UzbrbkhD2pFDcbExMp2fpzPex+/dZEkMmrxzKyZPZXw3DlWGFkBgms7DqeNBN7FnJ7KgIrbrEUE53J6RLEQb+M7NwIctPyy7vM6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uv7zf0ORXt5HI4diqrr95N+vFenl/TZyuETXf/05QF8pj+0LlN8Xzrpb3d7K8vtYoOdlJyn2XxbdPbDyP8tkktPL7xmXsvT79P2XPyZO4dLL70eb72O0PnF/p1HBZ4sif/m9aMv9lH5f17/8abrE9LH3DmsT66lW+ZnYhs1Y/ix9hpxe17//jWL5KzfQyemzNfofPtSrve/G0m9gL71dy94tVLY/aULiufHybx/biLT72v79b7hG+s1PsHwv47//C40zo6d4mAAA'
    bin = gzip.decompress(base64.b64decode(gz))
    with open(pymain, "wb") as f:
        f.write(bin)
    os.chmod(pymain, 0o775)

Solution (Python):
n = int(input())

i = 1
ans = 0
while (i <= n):
    total = sum(j for j in range(i, n+1, i))
    ans += total
    i += 1
print(ans)

Solution (Python):
import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array





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)

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


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

    N = ii()
    ans = 0
    for x in range(1, N + 1):
        n = N // x  
        ans += (n * (2 * x + (n - 1) * x)) // 2  
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array





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)

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


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

    N = ii()
    ans = 0
    for x in range(1, N + 1):
        n = N // x  
        ans += (n * (2 * x + (n - 1) * x)) // 2  
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())

ans = 0
for j in range(1, n+1):
    y = n // j
    ans += y * (2 * j + (y - 1) * j) // 2

print(ans)

Solution (Python):
def resolve():
    N = int(input())
    ans = 0
    for i in range(1, N+1):
        n = N//i
        ans += (n*(n+1)*i)//2
    print(ans)


if '__main__' == __name__:
    resolve()

Solution (Python):

def resolve():
    N = int(input())
    ans = 0
    counts = [1 for _ in range(N+1)]
    for i in range(2, N+1):
        j = 1
        while i*j <= N:
            counts[i*j] += 1
            j += 1

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


if '__main__' == __name__:
    resolve()

Solution (Python):
import math
import sys
import os
from operator import mul
import numpy as np


sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(_S())
def LS(): return list(_S().split())
def LI(): return list(map(int,LS()))

if os.getenv("LOCAL"):
    inputFile = basename_without_ext = os.path.splitext(os.path.basename(__file__))[0]+'.txt'
    sys.stdin = open(inputFile, "r")
INF = float("inf")

N = I()
ans = 0




for i in range(1,N+1):
    
    y = N//i
    sum = y*(y+1)*i/2
    ans += sum

print(int(ans))






def seachPrimeNum(N):
   max = int(np.sqrt(N))
   seachList = [i for i in range(2,N+1)]
   primeNum = []
   while seachList[0] <= max:
       primeNum.append(seachList[0])
       tmp = seachList[0]
       seachList = [i for i in seachList if i % tmp != 0]
   primeNum.extend(seachList)
   return primeNum


def divisor_count(n):
    divisors = 0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors += 1
            if i != n // i:
                divisors += 1

    return divisors

Solution (Python):
n = int(input())

ans = 0
for i in range(1, n + 1):
  for j in range(1, n//i + 1):
    if i * j <= n:
      ans += i * j
    else:
      break
      
print(ans)

Solution (Python):
n=int(input())
x=[-1]*(10**7+5)
x[0]=0
x[1]=1
i=2

x=[-1]*(10**7+5) 
x[0]=0
x[1]=1
i=2
prime=[]
while i<=10**7+1:

    if x[i]==-1:
        x[i]=i
        prime.append(i)

    for j in prime:
        if i*j>10**7+1 or j>x[i]:break
        x[j*i]=j
    i+=1

def f(k):
    if k==1:
        return 1

    z=[]
    p=x[k]
    m=1
    ans=1
    while k>=2:
        k=k//p
        if p==x[k]:
            m+=1
        else:
            z.append(m)
            m=1
            p=x[k]

    for i in range(len(z)):
        ans*=z[i]+1
    return ans
s=0
for i in range(1,n+1):
    s+=i*f(i)
print(s)

Solution (Python):
N = int(input())

f = [0] * (N+1)

for i in range(1, N+1):
    cnt = i
    while cnt <= N:
        f[cnt] += 1
        cnt += i

ans = 0

for i in range(1, N+1):
    ans += i*f[i]

print(ans)

Solution (Python):
n=int(input())
ans=0
for i in range(n):
    
    m=n//(i+1)
    
    ans += (i+1) *m*(m+1)/2
    
print(int(ans))

Solution (Python):
N = int(input())
sum_ = lambda n:(n*(n+1))//2
ret = sum(d*sum_(N//d) for d in range(1,N+1))

print(ret)

Solution (Python):
def g(x, n): 
  y = n // x
  return x * y * (y + 1) // 2

n = int(input())

sum = 0
for i in range(1, n + 1):
  k = n // i
  sum += g(i, n)
  
print(sum)

Solution (Python):
N = int(input())
ans = 0
for i in range(1,N+1):
    val = N // i
    ans += val*(val+1)*i//2
print(ans)

Solution (Python):
N = int(input())



ans = (N+1)*N//2
for num in range(2, N+1):
    for tt in range(N//num+1):
        ans += num*tt

print(ans)

Solution (Python):
n = int(input())
S = 0
for i in range(1,n+1):
  a = n//i
  j = i * a
  s = (i+j)*a//2
  S += s
  
print(S)

Solution (Python):
n=int(input())
print(sum(map(lambda x:n//x*(n//x+1)//2*x,range(1,n+1))))

Solution (Python):
n=int(input())
def f(x):
  tmp=(n//x)*(n//x+1)//2
  return x*tmp

ans=sum(map(f,range(1,n+1)))
print(ans)

Solution (Python):
n=int(input())

ans=0
for j in range(1,n+1): 
	a=j 
	d=n//j 
	tmp=(a+(a*d))*d//2
	ans+=tmp
	
print(ans)

Solution (Python):
n = int(input())

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

Solution (Python):
def main():
    n = int(input())
    ans = 0
    for i in range(1, n+1):
        tmp = n//i
        ans += i*tmp*(tmp+1)//2
    print(ans)
    return


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    n = int(input())
    ans = 0
    for i in range(1, n+1):
        tmp = n//i
        ans += i*tmp*(tmp+1)//2
    print(ans)
    return


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
ans = 0
for i in range(1, N+1):
    c = N//i
    ans += i*c*(c+1)//2

print(ans)

Solution (Python):
from collections import Counter


N = int(input())
ans = 0
for i in range(1, N+1):
    c = N//i
    ans += i*c*(c+1)//2

print(ans)

Solution (Python):
n = int(input())
ans = 0
for i in range(1,n+1):
    min = i
    max = int(n/i)*i
    xx = (max-min)/i+1
    ans += xx*(max+min)/2

print(int(ans))

Solution (Python):
n=int(input());print(sum((x:=n//i)*(x+1)*i//2 for i in range(1,n+1)))

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect, bisect_left, bisect_right

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

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

Solution (Python):
N = int(input())
ans = 0
for i in range(1, N + 1):
    M = N // i
    ans += M * (M + 1) // 2 * i
print(ans)

Solution (Python):
N = int(input())

ans = 0
for x in range(1, N + 1):
    n = N // x
    ans += n * (2 * x + (n - 1) * x) // 2

print(ans)

Solution (Python):
n=int(input())
x=[-1]*(10**7+5)
x[0]=0
x[1]=1
i=2
while i<=10**7+1:
    j=2*i
    if x[i]==-1:
        x[i]=i
        while j<=10**7+1:
            if x[j]==-1:x[j]=i
            j+=i
    i+=1
def f(k):
    if k==1:
        return 1

    z=[]
    p=x[k]
    m=1
    ans=1
    while k>=2:
        k=k//p
        if p==x[k]:
            m+=1
        else:
            z.append(m)
            m=1
            p=x[k]

    for i in range(len(z)):
        ans*=z[i]+1
    return ans
s=0
for i in range(1,n+1):
    s+=i*f(i)
print(s)

Solution (Python):
n=int(input())
x=[i for i in range(n+3)]
x[0]=0
x[1]=1
i=2
while i<=n+1:
    j=2*i
    if x[i]==i:
        
        while j<=n+1:
            if x[j]==j:x[j]=i
            j+=i
    i+=1
def f(k):
    if k==1:
        return 1

    z=[]
    p=x[k]
    m=1
    ans=1
    while k>=2:
        k=k//p
        if p==x[k]:
            m+=1
        else:
            z.append(m)
            m=1
            p=x[k]

    for i in range(len(z)):
        ans*=z[i]+1
    return ans
s=0
for i in range(1,n+1):
    s+=i*f(i)
print(s)

Solution (Python):
import numba
@numba.njit
def main(N):
    x = 0
    for a in range(1, N+1):
        b=N//a
        x += a*b*(b+1)//2
    return x
N = int(input())
print(main(N))

Solution (Python):
def main(N):
    x = 0
    for a in range(1, N+1):
        b=N//a
        x += a*b*(b+1)//2
    return x
 
N = int(input())
print(main(N))

Solution (Python):
import sys
import numba

@numba.njit
def main(N):
    x = 0
    for a in range(1, N+1):
        b=N//a
        x += a*b*(b+1)//2
    return x
 
N = int(input())
print(main(N))

Solution (Python):
N = int(input())
Answer = int((1/2)*N*(N+1))
Box = [i for i in range(N+1)]
for i in range(2,N+1):
    Answer += sum(Box[i::i])
print(Answer)

Solution (Python):
n=int(input())
x=[-1]*(10**7+5)
x[0]=0
x[1]=1
i=2
while i<=10**7+1:
    j=2*i
    if x[i]==-1:
        x[i]=i
        while j<=10**7+1:
            if x[j]==-1:x[j]=i
            j+=i
    i+=1
def f(k):
    if k==1:
        return 1

    z=[]
    p=x[k]
    m=1
    ans=1
    while k>=2:
        k=k//p
        if p==x[k]:
            m+=1
        else:
            z.append(m)
            m=1
            p=x[k]

    for i in range(len(z)):
        ans*=z[i]+1
    return ans
s=0
for i in range(1,n+1):
    s+=i*f(i)
print(s)

Solution (Python):


import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect
import math


def zz():
    return list(map(int, sys.stdin.readline().split()))


def z():
    return int(sys.stdin.readline())


def S():
    return sys.stdin.readline()


def C(line):
    return [sys.stdin.readline() for _ in range(line)]


def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]


N = z()
yakusu_nums = [0]*(N+1)
for i in range(1, N+1):
    for j in range(i, N+1, i):
        yakusu_nums[j] += 1
ans = 0
for i, yakusu_num in enumerate(yakusu_nums):
    
    ans += i*yakusu_num
print(ans)

Solution (Python):
n = int(input())
cnt = [-1] + [1] + [2] * 10000000
for i in range(2, 10000002 // 2):
    for j in range(2 * i, 10000001, i):
        cnt[j] += 1
ans = 0
for i in range(1, n + 1):
    ans += i * cnt[i]
print(ans)

Solution (Python):
N = int(input())

def sum_number_line(a: int, n: int) -> int:
    return (2*a + (n - 1)*a) * n // 2

ans = 0
for i in range(1, N + 1):
    ans += sum_number_line(i, N//i)

print(ans)

Solution (Python):
from math import floor
N = int(input())
ans = 0




for j in range(1, N+1):
    n = N//j
    ans += j*n*(n+1)//2
print(ans)

Solution (Python):
import numpy as np
from numba import njit

@njit
def main(N):
    spf = np.zeros(N+1,np.int32)
    prime = np.zeros(N+1,np.int32)
    index = 0
    for i in range(2,N+1):
        if not spf[i]:
            spf[i] = i
            prime[index] = i
            index += 1
        for j in range(index):
            if prime[j] > i or i*prime[j] > N:
                break
            spf[i*prime[j]] = prime[j]
    ans = 0
    for k in range(1,N+1):
        n = k
        before = spf[n]
        count = 0
        fk = 1
        while n > 1:
            if spf[n] == before:
                count += 1
                n //= spf[n]
            else:
                fk *= (count+1)
                before = spf[n]
                count = 1
                n //= spf[n]
        fk *= (count+1)
        ans += k*fk
    print(ans)
    
N = int(input())
main(N)

Solution (Python):
N=int(input())
ans = 0
for k in range(1,N+1):
    n_ = N // k
    ans_ = k*n_*(n_+1)//2
    ans+= ans_
print(ans)

Solution (Python):
def main(N):
    x = 0
    for i in range(1,N+1):
        for j in range(i,N+1,i):
            x += j
    return x
N = int(input())
print(main(N))

Solution (Python):
import numba

@numba.njit
def main(N):
    x = 0
    for i in range(1,N+1):
        for j in range(i,N+1,i):
            x += j
    return x
N = int(input())
print(main(N))

Solution (Python):
N = int(input())
ans = 0
for i in range(1,N+1):
    k = N // i
    ans += i * k * (k+1) // 2
print(ans)