Buggy python submission (verdict: Time Limit Exceeded):
from math import floor
N = int(input())


def g(X):
    Y = floor(N / X)
    return Y * (Y + 1) * X // 2


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

print(ans)


Fixed submission:
from math import floor
N = int(input())


def g(X):
    Y = floor(N / X)
    return Y * (Y + 1) * X // 2


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

print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np
N = int(input())


def make_prime(U):
    is_prime = np.zeros(U, np.bool)
    is_prime[2] = 1
    is_prime[3::2] = 1
    M = int(U**.5) + 1
    for p in range(3, M, 2):
        if is_prime[p]:
            is_prime[p * p::p + p] = 0
    return is_prime, is_prime.nonzero()[0]


def f(n):
    cnt = 0
    i = 0
    if n == 1:
        return 1
    for i in range(1, n + 1):
        if i * i > n:
            break
        if n % i == 0:
            cnt += 2
    if (i - 1) * (i - 1) == n:
        cnt -= 1
    return cnt


# D = [0] * (N + 1)
is_prime, is_prime_value = make_prime(N + 1)
D = np.zeros(N + 1, dtype='int')
D[is_prime] = 2

ans = 0
for i in range(1, N + 1):
    if D[i] == 0:

        cnt = 0
        j = 0
        if i == 1:
            D[i] = 1
        for j in range(1, i + 1):
            if j * j > i:
                break
            if j * j == i:
                if j in is_prime_value:
                    D[i] += D[i // j] + 1
                    break
                else:
                    cnt += 1
            if i % j == 0:
                if j in is_prime_value:
                    D[i] += D[n // j] + 2
                    break
                else:
                    cnt += 2
        else:
            D[i] = cnt
        # v = f(i)
        # D[i] = v
        # ans += v * i
    ans += D[i] * i
    # print('i, f(i)', i, f(i))
print(ans)


Fixed submission:
from math import floor
N = int(input())


def g(X):
    Y = floor(N / X)
    return Y * (Y + 1) * X // 2


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

print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np
N = int(input())


def make_prime(U):
    is_prime = np.zeros(U, np.bool)
    is_prime[2] = 1
    is_prime[3::2] = 1
    M = int(U**.5) + 1
    for p in range(3, M, 2):
        if is_prime[p]:
            is_prime[p * p::p + p] = 0
    return is_prime, is_prime.nonzero()[0]


def f(n):
    cnt = 0
    i = 0
    if n == 1:
        return 1
    for i in range(1, n + 1):
        if i * i > n:
            break
        if n % i == 0:
            cnt += 2
    if (i - 1) * (i - 1) == n:
        cnt -= 1
    return cnt


# D = [0] * (N + 1)
is_prime, is_prime_value = make_prime(N + 1)
D = np.zeros(N + 1, dtype='int')
D[is_prime] = 2

ans = 0
for i in range(1, N + 1):
    if D[i] == 0:

        cnt = 0
        j = 0
        if i == 1:
            D[i] = 1
        for j in range(1, i + 1):
            if j * j > i:
                break
            if j * j == i:
                if j in is_prime_value:
                    D[i] += D[i // j] + 1
                    break
                else:
                    cnt += 1
            if i % j == 0:
                if j in is_prime_value:
                    D[i] += D[n // j] + 2
                    break
                else:
                    cnt += 2
        else:
            D[i] = cnt
        # v = f(i)
        # D[i] = v
        # ans += v * i
    ans += D[i] * i
    # print('i, f(i)', i, f(i))
print(ans)


Fixed submission:
from math import floor
N = int(input())


def g(X):
    Y = floor(N / X)
    return Y * (Y + 1) * X // 2


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

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())


def f(n):
    cnt = 0
    i = 0
    if n == 1:
        return 1
    for i in range(1, n + 1):
        if i * i > n:
            break
        if n % i == 0:
            cnt += 2
    if (i - 1) * (i - 1) == n:
        cnt -= 1
    return cnt


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

print(ans)


Fixed submission:
from math import floor
N = int(input())


def g(X):
    Y = floor(N / X)
    return Y * (Y + 1) * X // 2


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

print(ans)