Buggy python submission (verdict: Time Limit Exceeded):
import math
import collections
def main():

    N = int(input())
    d = collections.defaultdict(int)
    for i in range(1, N+1):
        d[i] = 2
    d[1] = 1

    ans = 0
    for i in range(2, N//2+1):
        p = i + i
        while p <= N:
            d[p] += 1
            # if p // i > int(math.sqrt(N)):
                # d[p] += 1
            p += i

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

    return ans

if __name__ == '__main__':
    print(main())

Fixed submission:
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

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

if __name__ == '__main__':
    print(main())

Buggy python submission (verdict: Time Limit Exceeded):
import math
def main():

    N = int(input())

    d = [2 for _ in range(N+1)]
    d[1] = 1

    v = int(math.sqrt(N))

    for i in range(2, v+1):
        for j in range(i+i, N+1, i):
            d[j] += 1 + (j//i > v)

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

if __name__ == '__main__':
    print(main())

Fixed submission:
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

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

if __name__ == '__main__':
    print(main())

Buggy python submission (verdict: Time Limit Exceeded):
import math
def main():

    N = int(input())

    d = [2 for _ in range(N+1)]
    d[1] = 1

    v = int(math.sqrt(N))

    for i in range(2, v+1):
        for j in range(i+i, N+1, i):
            if j//i > v: d[j] += 2
            else: d[j] += 1

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

if __name__ == '__main__':
    print(main())

Fixed submission:
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

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

if __name__ == '__main__':
    print(main())

Buggy python submission (verdict: Runtime Error):
import math
def main():

    N = int(input())

    d = [2 for _ in range(N+1)]
    d[1] = 1

    v = int(math.sqrt(N))s

    for i in range(2, v+1):
        for j in range(i+i, N+1, i):
            if j//i > v: d[j] += 2
            else: d[j] += 1  

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

if __name__ == '__main__':
    print(main())

Fixed submission:
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

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

if __name__ == '__main__':
    print(main())

Buggy python submission (verdict: Time Limit Exceeded):
import math
def main():

    N = int(input())

    d = [2 for _ in range(N+1)]
    d[1] = 1

    # for i in range(2, N//2+1):
    #     for j in range(i+i, N+1, i):
    #         d[j] += 1

    v = int(math.sqrt(N))
    for i in range(2, v+1):
        for j in range(i+i, N+1, i):
            d[j] += 1
            if j//i > v: d[j] += 1

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

if __name__ == '__main__':
    print(main())

Fixed submission:
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

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

if __name__ == '__main__':
    print(main())

Buggy python submission (verdict: Runtime Error):
 import math
def main():

    N = int(input())

    d = [2 for _ in range(N+1)]
    d[1] = 1

    # for i in range(2, N//2+1):
    #     for j in range(i+i, N+1, i):
    #         d[j] += 1

    v = int(math.sqrt(N))
    for i in range(2, v+1):
        for j in range(i+i, N+1, i):
            d[j] += 1
            if j//i > v: d[j] += 1

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

if __name__ == '__main__':
    print(main())


Fixed submission:
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

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

if __name__ == '__main__':
    print(main())

Buggy python submission (verdict: Time Limit Exceeded):
import math
def main():

    N = int(input())

    d = [2 for _ in range(N+1)]
    d[1] = 1

    v = int(math.sqrt(N))
    for i in range(2, v+1):
        for j in range(i+i, N+1, i):
            d[j] += 1
            if j//i > v: d[j] += 1

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

if __name__ == '__main__':
    print(main())

Fixed submission:
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

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

if __name__ == '__main__':
    print(main())

Buggy python submission (verdict: Time Limit Exceeded):
import math
def main():

    N = int(input())

    d = [0 for _ in range(N+1)]

    v = int(math.sqrt(N))
    for i in range(1, v+1):
        for j in range(i, N+1, i):
            d[j] += 1
            if j//i > v: d[j] += 1

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

if __name__ == '__main__':
    print(main())


Fixed submission:
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

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

if __name__ == '__main__':
    print(main())

Buggy python submission (verdict: Time Limit Exceeded):
import math
def main():

    N = int(input())

    d = [0 for _ in range(N+1)]

    v = int(math.sqrt(N))
    for i in range(1, v+1):
        for j in range(i, N+1, i):
            d[j] += 1
            if j//i > v: d[j] += 1

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

if __name__ == '__main__':
    print(main())


Fixed submission:
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

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

if __name__ == '__main__':
    print(main())

Buggy python submission (verdict: Time Limit Exceeded):
import math
def main():

    N = int(input())

    d = [0 for _ in range(N+1)]

    v = int(math.sqrt(N))
    for i in range(1, v+1):
        p = i
        while p <= N:
            d[p] += 1
            if p//i > v and p//i > i:
                d[p] += 1
            p += i
    ans = 0
    for i in range(1, N+1):
        ans += i * d[i]
    return ans

if __name__ == '__main__':
    print(main())

Fixed submission:
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

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

if __name__ == '__main__':
    print(main())

Buggy python submission (verdict: Time Limit Exceeded):
import math
import collections
def main():

    N = int(input())

    d = collections.defaultdict(int)

    v = int(math.sqrt(N))
    for i in range(1, v+1):
        p = i
        while p <= N:
            d[p] += 1
            if p//i > v and p//i > i:
                d[p] += 1
            p += i
    ans = 0
    for i in range(1, N+1):
        ans += i * d[i]
    return ans

if __name__ == '__main__':
    print(main())


Fixed submission:
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

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

if __name__ == '__main__':
    print(main())

Buggy python submission (verdict: Time Limit Exceeded):
import math
def main():

    N = int(input())

    d = dict()
    for i in range(1, N+1):d[i] = 0

    v = int(math.sqrt(N))
    for i in range(1, v+1):
        p = i
        while p <= N:
            d[p] += 1
            if p//i > v and p//i > i:
                d[p] += 1
            p += i
    ans = 0
    for i in range(1, N+1):
        ans += i * d[i]
    return ans

if __name__ == '__main__':
    print(main())


Fixed submission:
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

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

if __name__ == '__main__':
    print(main())

Buggy python submission (verdict: Time Limit Exceeded):
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

    ans = 0
    for i in range(1, N+1):
        p = i
        while p <= N:
            d[p] += 1
            p += i
    for i in range(1, N+1):
        ans += d[i] * i

    return ans

if __name__ == '__main__':
    print(main())


Fixed submission:
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

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

if __name__ == '__main__':
    print(main())

Buggy python submission (verdict: Time Limit Exceeded):
import math
import collections
def main():

    N = int(input())
    d = collections.defaultdict(int)

    ans = 0
    for i in range(1, int(math.sqrt(N))+1):
        p = i
        while p <= N:
            d[p] += 1
            if p // i > int(math.sqrt(N)):
                d[p] += 1
            p += i

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

    return ans

if __name__ == '__main__':
    print(main())


Fixed submission:
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

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

if __name__ == '__main__':
    print(main())

Buggy python submission (verdict: Time Limit Exceeded):
import math
import collections
def main():

    N = int(input())
    d = collections.defaultdict(int)

    ans = 0
    for i in range(1, int(math.sqrt(N))+1):
        p = i
        while p <= N:
            d[p] += 1
            if p // i > int(math.sqrt(N)):
                d[p] += 1
            p += i

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

    return ans

if __name__ == '__main__':
    print(main())

Fixed submission:
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

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

if __name__ == '__main__':
    print(main())

Buggy python submission (verdict: Time Limit Exceeded):
import math
import collections
def main():

    N = int(input())
    d = collections.defaultdict(set)

    ans = 0
    for i in range(1, int(math.sqrt(N))+1):
        p = i
        while p <= N:
            d[p].add(i)
            d[p].add(p//i)
            p += i

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

    return ans

if __name__ == '__main__':
    print(main())

Fixed submission:
import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

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

if __name__ == '__main__':
    print(main())