Buggy python submission (verdict: Runtime Error):
def make_divisors(n):
    divisors = []
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.append(n)
    # divisors.sort()
    return divisors

n=int(input())
l=[]
# print(make_divisors(n))
for i in make_divisors(n):
    k=i-1
    if n//k==n%k:
        # print(k+1,n//k,n%k)
        l.append(k)
# print(l)
print(sum(l))



Fixed submission:
def make_divisors(n):
    divisors = []
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.append(n)
    # divisors.sort()
    return divisors

n=int(input())
l=[]
# print(make_divisors(n))
md=make_divisors(n)
if 1 in md:
    md.remove(1)
for i in md:
    k=i-1
    if n//k==n%k:
        # print(k+1,n//k,n%k)
        l.append(k)
# print(l)
print(sum(l))

Buggy python submission (verdict: Runtime Error):
def make_divisors(n):
    divisors = []
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.append(n)
    # divisors.sort()
    return divisors

n=int(input())
l=[]
# print(make_divisors(n))
for i in make_divisors(n):
    k=i-1
    if n//k==n%k:
        # print(k+1,n//k,n%k)
        l.append(k)
# print(l)
print(sum(l))



Fixed submission:
def make_divisors(n):
    divisors = []
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.append(n)
    # divisors.sort()
    return divisors

n=int(input())
l=[]
# print(make_divisors(n))
md=make_divisors(n)
if 1 in md:
    md.remove(1)
for i in md:
    k=i-1
    if n//k==n%k:
        # print(k+1,n//k,n%k)
        l.append(k)
# print(l)
print(sum(l))

Buggy python submission (verdict: Runtime Error):
def make_divisors(n):
    divisors = []
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.append(n)
    # divisors.sort()
    return divisors

n=int(input())
l=[]
# print(make_divisors(n))
for i in make_divisors(n):
    k=i-1
    if n//k==n%k:
        # print(k+1,n//k,n%k)
        l.append(k)
# print(l)
print(sum(l))



Fixed submission:
def make_divisors(n):
    divisors = []
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.append(n)
    # divisors.sort()
    return divisors

n=int(input())
l=[]
# print(make_divisors(n))
md=make_divisors(n)
if 1 in md:
    md.remove(1)
for i in md:
    k=i-1
    if n//k==n%k:
        # print(k+1,n//k,n%k)
        l.append(k)
# print(l)
print(sum(l))

Buggy python submission (verdict: Runtime Error):
def make_divisors(n):
    divisors = []
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.append(n)
    # divisors.sort()
    return divisors

n=int(input())
l=[]
# print(make_divisors(n))
for i in make_divisors(n):
    k=i-1
    if n//k==n%k:
        # print(k+1,n//k,n%k)
        l.append(k)
# print(l)
print(sum(l))



Fixed submission:
def make_divisors(n):
    divisors = []
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.append(n)
    # divisors.sort()
    return divisors

n=int(input())
l=[]
# print(make_divisors(n))
md=make_divisors(n)
if 1 in md:
    md.remove(1)
for i in md:
    k=i-1
    if n//k==n%k:
        # print(k+1,n//k,n%k)
        l.append(k)
# print(l)
print(sum(l))