Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
import numpy as np


def solve(N):
    fx = np.zeros(N + 1, dtype=np.uint32)
    for i in range(1, N + 1):
        fx[i::i] += 1
    return np.sum(np.arange(0, N + 1, dtype=np.uint64) * fx)


def main():
    N = int(input())  # type: int
    answer = solve(N)
    print(answer)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3

#                 N    N'
#   | 1  2  3  4  5
# 1 | 1  2  3  4  5 :  N // 1   1 * N' (N'+1) // 2
# 2 |    2     4    :  N // 2   2 * N' (N'+1) // 2
# 3 |       3       :  N // 3   3 * N' (N'+1) // 2
# 4 |          4    :  N // 4   4 * N' (N'+1) // 2
# 5 |             5 :  N // 5   5 * N' (N'+1) // 2


def solve(N):
    answer = 0
    for i in range(1, N + 1):
        mprime = N // i
        answer += i * (mprime * (mprime + 1)) // 2
    return answer


def main():
    N = int(input())  # type: int
    answer = solve(N)
    print(answer)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
import sys
from itertools import chain
import numpy as np


def solve(N: int):
    fx = np.zeros(N + 1, dtype=np.uint64)
    for i in range(1, N + 1):
        fx[i::i] += 1
    return np.sum(np.arange(0, N + 1, dtype=np.uint64) * fx)


def main():
    tokens = chain(*(line.split() for line in sys.stdin))
    # N = map(int, line.split())
    N = int(next(tokens))  # type: int
    answer = solve(N)
    print(answer)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3

#                 N    N'
#   | 1  2  3  4  5
# 1 | 1  2  3  4  5 :  N // 1   1 * N' (N'+1) // 2
# 2 |    2     4    :  N // 2   2 * N' (N'+1) // 2
# 3 |       3       :  N // 3   3 * N' (N'+1) // 2
# 4 |          4    :  N // 4   4 * N' (N'+1) // 2
# 5 |             5 :  N // 5   5 * N' (N'+1) // 2


def solve(N):
    answer = 0
    for i in range(1, N + 1):
        mprime = N // i
        answer += i * (mprime * (mprime + 1)) // 2
    return answer


def main():
    N = int(input())  # type: int
    answer = solve(N)
    print(answer)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
import sys
from itertools import chain
import numpy as np


def solve(N: int):
    fx = np.zeros(N + 1, dtype=np.uint64)
    for i in range(1, N + 1):
        fx[i::i] += 1
    return np.sum(np.arange(0, N + 1, dtype=np.uint64) * fx)


def main():
    tokens = chain(*(line.split() for line in sys.stdin))
    # N = map(int, line.split())
    N = int(next(tokens))  # type: int
    answer = solve(N)
    print(answer)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3

#                 N    N'
#   | 1  2  3  4  5
# 1 | 1  2  3  4  5 :  N // 1   1 * N' (N'+1) // 2
# 2 |    2     4    :  N // 2   2 * N' (N'+1) // 2
# 3 |       3       :  N // 3   3 * N' (N'+1) // 2
# 4 |          4    :  N // 4   4 * N' (N'+1) // 2
# 5 |             5 :  N // 5   5 * N' (N'+1) // 2


def solve(N):
    answer = 0
    for i in range(1, N + 1):
        mprime = N // i
        answer += i * (mprime * (mprime + 1)) // 2
    return answer


def main():
    N = int(input())  # type: int
    answer = solve(N)
    print(answer)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python3
import sys
from itertools import chain
import numpy as np


def sieve(n: int):
    """n以下の(1を含まない)素数を返す"""
    if n < 2:
        return []
    primes = [2]
    if n == 2:
        return primes
    flags = np.array([True for i in range(3, n + 1, 2)])
    for i in range(len(flags)):
        if flags[i]:
            n = i * 2 + 3
            primes.append(n)
            flags[i::n] = False
    return primes


def print_a(A):
    for i in range(0, len(A), 5):
        s = f"{i:3} :"
        for j in range(i, min(i + 5, len(A))):
            s += f"{A[j]:7d}"
        print(s)


def f(X, primes):
    y = 1
    for prime in primes:
        if prime > X:
            break
        count = 1
        while X % prime == 0:
            X = X // prime
            count += 1
        y *= count
    return y


def solve(N: int):
    primes = sieve(N)
    fx = np.ones(N + 1, dtype=np.uint64)
    for prime in primes:
        factor = prime
        t = 1
        while factor <= N:
            fx[factor::factor] *= (t + 1)
            fx[factor::factor] = fx[factor::factor] / t
            t += 1
            factor *= prime
    fx *= np.arange(0, len(fx), dtype=np.uint64)
    return fx.sum()


def main():
    tokens = chain(*(line.split() for line in sys.stdin))
    # N = map(int, line.split())
    N = int(next(tokens))  # type: int
    answer = solve(N)
    print(answer)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3

#                 N    N'
#   | 1  2  3  4  5
# 1 | 1  2  3  4  5 :  N // 1   1 * N' (N'+1) // 2
# 2 |    2     4    :  N // 2   2 * N' (N'+1) // 2
# 3 |       3       :  N // 3   3 * N' (N'+1) // 2
# 4 |          4    :  N // 4   4 * N' (N'+1) // 2
# 5 |             5 :  N // 5   5 * N' (N'+1) // 2


def solve(N):
    answer = 0
    for i in range(1, N + 1):
        mprime = N // i
        answer += i * (mprime * (mprime + 1)) // 2
    return answer


def main():
    N = int(input())  # type: int
    answer = solve(N)
    print(answer)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
import sys
from itertools import chain
import numpy as np


def sieve(n: int):
    """n以下の(1を含まない)素数を返す"""
    if n < 2:
        return []
    primes = [2]
    if n == 2:
        return primes
    flags = np.array([True for i in range(3, n + 1, 2)])
    for i in range(len(flags)):
        if flags[i]:
            n = i * 2 + 3
            primes.append(n)
            flags[i::n] = False
    return primes


def print_a(A):
    for i in range(0, len(A), 5):
        s = f"{i:3} :"
        for j in range(i, min(i + 5, len(A))):
            s += f"{A[j]:7d}"
        print(s)


def f(X, primes):
    y = 1
    for prime in primes:
        if prime > X:
            break
        count = 1
        while X % prime == 0:
            X = X // prime
            count += 1
        y *= count
    return y


def solve(N: int):
    primes = sieve(N)
    fx = np.ones(N + 1, dtype=np.uint64)
    for prime in primes:
        factor = prime
        t = 1
        while factor <= N:
            fx[factor::factor] *= (t + 1)
            fx[factor::factor] = fx[factor::factor] / t
            t += 1
            factor *= prime
    fx *= np.arange(0, len(fx), dtype=np.uint64)
    return fx.sum()


def main():
    tokens = chain(*(line.split() for line in sys.stdin))
    # N = map(int, line.split())
    N = int(next(tokens))  # type: int
    answer = solve(N)
    print(answer)


if __name__ == "__main__":
    main()


Fixed submission:
#!/usr/bin/env python3

#                 N    N'
#   | 1  2  3  4  5
# 1 | 1  2  3  4  5 :  N // 1   1 * N' (N'+1) // 2
# 2 |    2     4    :  N // 2   2 * N' (N'+1) // 2
# 3 |       3       :  N // 3   3 * N' (N'+1) // 2
# 4 |          4    :  N // 4   4 * N' (N'+1) // 2
# 5 |             5 :  N // 5   5 * N' (N'+1) // 2


def solve(N):
    answer = 0
    for i in range(1, N + 1):
        mprime = N // i
        answer += i * (mprime * (mprime + 1)) // 2
    return answer


def main():
    N = int(input())  # type: int
    answer = solve(N)
    print(answer)


if __name__ == "__main__":
    main()