Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n = inp()
res = [0] * (n+1)
ans = 0
for i in range(1,n+1):
    for j in range(1,n+1):
        if i*j > n: break
        res[i*j] += 1
    ans += i*res[i]
print(ans)

Fixed submission:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n = inp()
ans = [0] * (n+1)
for i in range(1,n+1):
    for j in range(1,n+1):
        if i*j > n: break
        ans[i*j] += 1
res = 0
for i in range(1,n+1):
    res += i*ans[i]
print(res)

Buggy python submission (verdict: Runtime Error):
は？

Fixed submission:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n = inp()
ans = [0] * (n+1)
for i in range(1,n+1):
    for j in range(1,n+1):
        if i*j > n: break
        ans[i*j] += 1
res = 0
for i in range(1,n+1):
    res += i*ans[i]
print(res)

Buggy python submission (verdict: Runtime Error):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

def sieve_of_erastosthenes(num):
    input_list = [False if i % 2 == 0 or i % 3 == 0 or i % 5 == 0 else True for i in range(num)]
    input_list[0] = input_list[1] = False
    input_list[2] = input_list[3] = input_list[5] = True
    sqrt = math.sqrt(num)

    for serial in range(3, num, 2):

        if serial >= sqrt:
            return input_list

        for s in range(serial ** 2, num, serial): 
            input_list[s] = False

n = inp()
if n == 1:
    print(1)
    quit()
cnt = 1
res = 1
ans = [-1] * (n+1)
ans[1] = 1 
pp = sieve_of_erastosthenes(n)
# print(pl)
pl = []
for x in range(1,n):
    if not pp[x]: continue
    # print(x)
    cnt += 1
    ans[x] = 2
    res += 2*x
    c = 2
    while pow(x,c) <= n:
        now = pow(x,c)
        if ans[now] == -1:
            ans[now] = c+1
            res += now*(c+1)
            cnt += 1
        c += 1
# print(ans)
while cnt < n:
    for i in range(2,n+1):
        for j in range(i+1,n+1):
            if i * j > n: break
            if math.gcd(i,j) != 1 or ans[i*j] != -1: continue
            if ans[j] == -1: continue
            ans[i*j] = ans[i] * ans[j]
            res += (i*j) * ans[i*j]
            cnt += 1
# print(ans)
# for i in range(1,n+1):
#     res += ans[i] * i
#     if ans[i] < -1:
#         print(i)
print(res)

Fixed submission:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n = inp()
ans = [0] * (n+1)
for i in range(1,n+1):
    for j in range(1,n+1):
        if i*j > n: break
        ans[i*j] += 1
res = 0
for i in range(1,n+1):
    res += i*ans[i]
print(res)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

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")
    data = [i for i in range(2, n + 1)]
    for d in data:
        data = [x for x in data if (x == d or x % d != 0)]
    return data

n = inp()
if n == 1:
    print(1)
    quit()
cnt = 1
res = 1
ans = [-1] * (n+1)
ans[1] = 1 
pl = get_sieve_of_eratosthenes(n)
for x in pl:
    # print(x)
    cnt += 1
    ans[x] = 2
    res += 2*x
    c = 2
    while pow(x,c) <= n:
        now = pow(x,c)
        if ans[now] == -1:
            ans[now] = c+1
            res += now*(c+1)
            cnt += 1
        c += 1
# print(ans)
while cnt < n:
    for i in range(2,n+1):
        for j in range(i+1,n+1):
            if i * j > n: break
            if math.gcd(i,j) != 1 or ans[i*j] != -1: continue
            if ans[j] == -1: continue
            ans[i*j] = ans[i] * ans[j]
            res += (i*j) * ans[i*j]
            cnt += 1
# print(ans)
# for i in range(1,n+1):
#     res += ans[i] * i
#     if ans[i] < -1:
#         print(i)
print(res)

Fixed submission:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n = inp()
ans = [0] * (n+1)
for i in range(1,n+1):
    for j in range(1,n+1):
        if i*j > n: break
        ans[i*j] += 1
res = 0
for i in range(1,n+1):
    res += i*ans[i]
print(res)