Buggy python submission (verdict: Time Limit Exceeded):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from collections import defaultdict
def main():
    n = int(input())
    if n == 1:
        print(1)
        sys.exit()
    # 1からｎまでの数それぞれの約数を求める。約数の側から倍数になっているか数える。
    nums = [2] * (n + 1) # 1～nの約数をいれる器。「1とその数自身」があるので初期値2．
    nums[1] = 1 # 1の約数は１だけなので初期値１。
    for i1 in range(2, n // 2 + 1):
        for i2 in range(i1 * 2, n + 1, i1): # i1～nのあいだを間隔i1でスキップしていく。
            nums[i2] += 1
    r = 1 # 数１のk * f(k)は１なので初期値に１にする。
    for j1 in range(2, n + 1):
        r += j1 * nums[j1]
    print(r)

if __name__ == '__main__':
    main()

Fixed submission:
import sys
read = sys.stdin.read
from math import sqrt, floor
def main():
    n = int(input())
    if n == 1:
        print(1)
        sys.exit()
    # nd:num of div
    nd = [2] * (n + 1)

    for i1 in range(2, floor(n / 2) + 1):
        for i2 in range(i1 * 2, n + 1, i1):
            nd[i2] += 1

    r = 1
    for j1 in range(2, n + 1):
        r += nd[j1] * j1
    print(r)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from collections import defaultdict
def main():
    n = int(input())

    maxa2 = n + 1
    maxa2 = max(6, maxa2)  # maxa2が6未満だとエラーになる
    p = [False if i % 2 == 0 or i % 3 == 0 or i % 5 == 0 else True for i in range(maxa2)]
    p[0] = p[1] = False
    p[2] = p[3] = p[5] = True
    for is1 in range(3, maxa2, 2):
        for is2 in range(is1 ** 2, maxa2, is1):
            p[is2] = False
    prime_list = [i for i, b in enumerate(p) if b]

    nums = [i for i in range(n + 1)]
    prime_nums = {e: defaultdict(int) for e in range(n + 1)}
    for prime in prime_list:
        p = prime
        for i1 in range(n // prime):
            t1 = nums[p]
            jisu = 0
            while t1 > 1 and t1 % prime == 0:
                jisu += 1
                t1 = t1 // prime
            nums[p] = t1
            prime_nums[p][prime] = jisu
            p += prime
    r = 0
    for i, pre in enumerate(prime_nums.values()):
        t2 = i
        for v in pre.values():
            t2 *= (v + 1)
        r += t2
    print(r)

if __name__ == '__main__':
    main()

Fixed submission:
import sys
read = sys.stdin.read
from math import sqrt, floor
def main():
    n = int(input())
    if n == 1:
        print(1)
        sys.exit()
    # nd:num of div
    nd = [2] * (n + 1)

    for i1 in range(2, floor(n / 2) + 1):
        for i2 in range(i1 * 2, n + 1, i1):
            nd[i2] += 1

    r = 1
    for j1 in range(2, n + 1):
        r += nd[j1] * j1
    print(r)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from collections import defaultdict
def main():
    def factorization(n):
        arr = []
        temp = n
        for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
            if temp % i == 0:
                cnt = 0
                while temp % i == 0:
                    cnt += 1
                    temp //= i
                arr.append([i, cnt])
        if temp != 1:
            arr.append([temp, 1])
        if arr == []:
            arr.append([n, 1])
        return arr

    n = int(input())
    r = 1
    for i1 in range(2, n + 1):
        pn = factorization(i1)
        t1 = i1
        for pne in pn:
            t1 *= (pne[1] + 1)
        r += t1
    print(r)


if __name__ == '__main__':
    main()

Fixed submission:
import sys
read = sys.stdin.read
from math import sqrt, floor
def main():
    n = int(input())
    if n == 1:
        print(1)
        sys.exit()
    # nd:num of div
    nd = [2] * (n + 1)

    for i1 in range(2, floor(n / 2) + 1):
        for i2 in range(i1 * 2, n + 1, i1):
            nd[i2] += 1

    r = 1
    for j1 in range(2, n + 1):
        r += nd[j1] * j1
    print(r)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
def main():
    n = int(input())
    if n == 1:
        print(1)
        sys.exit()
    # nd:num of div
    r = 0
    for i1 in range(1, n):
        y = n // i1
        r += y * (y + 1) * i1 / 2
    print(int(r))

if __name__ == '__main__':
    main()


Fixed submission:
import sys
read = sys.stdin.read
from math import sqrt, floor
def main():
    n = int(input())
    if n == 1:
        print(1)
        sys.exit()
    # nd:num of div
    nd = [2] * (n + 1)

    for i1 in range(2, floor(n / 2) + 1):
        for i2 in range(i1 * 2, n + 1, i1):
            nd[i2] += 1

    r = 1
    for j1 in range(2, n + 1):
        r += nd[j1] * j1
    print(r)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
read = sys.stdin.read
from functools import reduce
from operator import mul
def main():
    n = int(input())
    # n=1ならprint(1)してexit(コーナーケース対策).
    if n == 1:
        print(1)
        sys.exit()

    jisu = [[] for _ in range(n + 1)]
    jisu[1].append(1)
    num = [i for i in range(n + 1)]
    for i1 in range(2, n + 1):
        if jisu[i1]:
            continue
        else:
            jisu[i1].append(1)
            for i2 in range(i1, n + 1, i1):
                if num[i2] == 1 or i2 % i1 != 0:
                    continue
                else:
                    tmp1 = 2
                    num[i2] /= i1
                    while num[i2] > 1:
                        if num[i2] % i1 == 0:
                            num[i2] /= i1
                            tmp1 += 1
                        else:
                            break
                    jisu[i2].append(tmp1)
    r = 1
    for j1 in range(2, n + 1):
        t = reduce(mul, jisu[j1])
        t *= j1
        r += t
    print(r)
if __name__ == '__main__':
    main()

Fixed submission:
import sys
read = sys.stdin.read
from math import sqrt, floor
def main():
    n = int(input())
    if n == 1:
        print(1)
        sys.exit()
    # nd:num of div
    nd = [2] * (n + 1)

    for i1 in range(2, floor(n / 2) + 1):
        for i2 in range(i1 * 2, n + 1, i1):
            nd[i2] += 1

    r = 1
    for j1 in range(2, n + 1):
        r += nd[j1] * j1
    print(r)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
read = sys.stdin.read
from functools import reduce
from operator import mul
def main():
    n = int(input())
    # n=1ならprint(1)してexit(コーナーケース対策).
    if n == 1:
        print(1)
        sys.exit()

    jisu = [[] for _ in range(n + 1)]
    jisu[1].append(1)
    num = [i for i in range(n + 1)]
    for i1 in range(2, n + 1):
        if jisu[i1]:
            continue
        else:
            jisu[i1].append(1)
            for i2 in range(i1, n + 1, i1):
                if num[i2] == 1 or i2 % i1 != 0:
                    continue
                else:
                    tmp1 = 2
                    num[i2] /= i1
                    while num[i2] > 1:
                        if num[i2] % i1 == 0:
                            num[i2] /= i1
                            tmp1 += 1
                        else:
                            break
                    jisu[i2].append(tmp1)
    r = 1
    for j1 in range(2, n + 1):
        t = reduce(mul, jisu[j1])
        t *= j1
        r += t
    print(r)
if __name__ == '__main__':
    main()

Fixed submission:
import sys
read = sys.stdin.read
from math import sqrt, floor
def main():
    n = int(input())
    if n == 1:
        print(1)
        sys.exit()
    # nd:num of div
    nd = [2] * (n + 1)

    for i1 in range(2, floor(n / 2) + 1):
        for i2 in range(i1 * 2, n + 1, i1):
            nd[i2] += 1

    r = 1
    for j1 in range(2, n + 1):
        r += nd[j1] * j1
    print(r)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
from math import floor
from math import factorial
from operator import mul
from functools import reduce
from collections import defaultdict
def main():
    def factorization(n):
        arr = []
        temp = n
        for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
            if temp % i == 0:
                cnt = 0
                while temp % i == 0:
                    cnt += 1
                    temp //= i
                arr.append([i, cnt])
        if temp != 1:
            arr.append([temp, 1])
        if arr == []:
            arr.append([n, 1])
        return arr
    n = int(input())
    if n == 1:
        print(1)
        sys.exit()

    from math import sqrt
    from math import ceil
    maxa = n  # maxa＝「素数判定したい数字のうち最大の数字」
    maxa2 = n
    maxa2 = max(6, maxa2)  # maxa2が6未満だとエラーになる
    p = [False if i % 2 == 0 or i % 3 == 0 or i % 5 == 0 else True for i in range(maxa2)]
    p[0] = p[1] = False
    p[2] = p[3] = p[5] = True
    for is1 in range(3, maxa2, 2):
        for is2 in range(is1 ** 2, maxa2, is1):
            p[is2] = False
    prime_list = [i for i, b in enumerate(p) if b]

    ps = {e: defaultdict(int) for e in range(n + 1)}
    nums = [i for i in range(n + 1)]
    for pe in prime_list:
        flag = True
        while flag:
            flag = False
            for i1 in range(2,n + 1):
                if nums[i1] % pe == 0:
                    nums[i1] /= pe
                    ps[i1][pe] += 1
                    flag = True

    r = 1
    for i1 in range(2, n + 1):
        pse = ps[i1]
        if pse:
            psv = pse.values()
            psv2 = [i + 1 for i in psv]
            tmp = reduce(mul, psv2)
            r += tmp * i1
    print(r)

if __name__ == '__main__':
    main()

Fixed submission:
import sys
read = sys.stdin.read
from math import sqrt, floor
def main():
    n = int(input())
    if n == 1:
        print(1)
        sys.exit()
    # nd:num of div
    nd = [2] * (n + 1)

    for i1 in range(2, floor(n / 2) + 1):
        for i2 in range(i1 * 2, n + 1, i1):
            nd[i2] += 1

    r = 1
    for j1 in range(2, n + 1):
        r += nd[j1] * j1
    print(r)

if __name__ == '__main__':
    main()