ZhenlongDai/ACPR huggingface dataset:
Problem: p03050
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n=int(input())
if int(n**(1/2))!=n**(1/2):
    a=int(n**(1/2))+1
else:
    a=int(n**(1/2))
print(a)
ans=0
for i in range(1,a):
    if (n-i)%i==0 and n-i>=i:
        ans+=(n-i)
print(ans)

Failing test case input:
1110011011010

Expected output:
2179701971815


Actual output:
1053571
17760173033047


Fixed submission (verdict: Accepted):
n=int(input())
if int(n**(1/2))!=n**(1/2):
    a=int(n**(1/2))+1
else:
    a=int(n**(1/2))
ans=0
for i in range(1,a):
    if (n-i)%i==0 and n-i>=i and (n-i)
        ans+=(n-i)
print(ans)

Problem: p03050
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
ans = 0

for x in range(1, int((N-1)**(1/2)+1)):
    if (N-x) % x == 0:
        ans += (N-x)
print(ans)


Failing test case input:
1010100000001

Expected output:
1025176119402


Actual output:
2020199999934


Fixed submission (verdict: Accepted):
N = int(input())
ans = 0
for x in range(1, int(N**(1/2)+2)):
    if (N-x) % x == 0:
        if (N-x)
            ans += (N-x)

print(ans)

Problem: p03050
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
ans = 0
for i in range(1,int(n**(1/2))+1):
    s = i
    a = i
    if (n-a)%s==0:
        ans += (n-a)
print(ans)

Failing test case input:
1001101010110

Expected output:
1801981818194


Actual output:
4004404040422


Fixed submission (verdict: Accepted):
n = int(input())
ans = 0
for i in range(1,int(n**(1/2))+1):
    s = i
    a = i
    if (n-a)%s==0:
        if (n-a)
            ans += (n-a)
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())
ans = 0
for i in range(1, int(n**0.5)+1):
    n2 = n - i
    if n2 % i == 0:
        
        try:
            if abs(n/(n2/i) - i) < 0.95:
                ans += math.ceil(n2 / i)
        except:
            pass

print(ans)


Failing test case input:
1001000100000

Expected output:
3333395053920


Actual output:
3333394048921


Fixed submission (verdict: Accepted):
import math
n = int(input())
ans = 0



for i in range(1, int(n**0.5)+1):
    n2 = n - i

    if n2 % i == 0:
        
        

        try:
            if n
                ans += math.ceil(n2 / i)
        except:
            pass

print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

ans = 0
n = int(N ** 0.5) + 1
for i in range(1,n):
    if N % i != 0 or i ** 2 == N:
        continue
    ans += N 

print(ans)
    

Failing test case input:
1110011100100

Expected output:
2753043984264


Actual output:
39960399603600


Fixed submission (verdict: Accepted):
N = int(input())

ans = 0
n = int(N ** 0.5) + 1
for i in range(1,n):
    if N % i != 0 or i ** 2 == N:
        continue
    if i == (N % (N 
        ans += N 

print(ans)
Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

N = int(input())
sum = 0

for i in range(1, N+1):
    if (N-i) % i == 0:
        m = int((N-i) / i)
        if(m <= i):
            print(sum)
            sys.exit()
        
        sum += m
    if((N-i)/i <= i):
        sys.exit()

Failing test case input:
1000011010000

Expected output:
2530186209521


Actual output:

Fixed submission (verdict: Accepted):
import sys

N = int(input())
sum = 0

for i in range(1, N+1):
    if (N-i) % i == 0:
        m = int((N-i) / i)
        if(m <= i):
            print(sum)
            sys.exit()
        
        sum += m
    if((N-i)/i < i):
        print(sum)
        sys.exit()

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

def divisor(num):
    if num < 0:
        return 0
    if num == 1:
        return [1, ]

    divisor_list = [1, ]
    divisor_list_r = [num, ]

    i = 2
    while i * i < num:
        if num % i == 0:
            divisor_list.append(i)
        i += 1

    return divisor_list

N = int(input())
divisor_list = divisor(N)
ans = 0
for i in divisor_list:
    ans += (N - i) 

print(ans)


Failing test case input:
1001101000110

Expected output:
2402642400256


Actual output:
8008808000808


Fixed submission (verdict: Accepted):
import math

def divisor(num):
    if num < 0:
        return 0
    if num == 1:
        return [1, ]

    divisor_list = [1, ]
    divisor_list_r = [num, ]

    i = 2
    while i * i <= num:
        if num % i == 0:
            divisor_list.append(i)
        i += 1

    return divisor_list

N = int(input())
divisor_list = divisor(N)
ans = 0
for i in divisor_list:
    tmp = (N - i) 
    if tmp == 0:
        continue
    if i 
        continue
    ans += tmp

print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

N = int(input())

ans = 0
for i in range(1, int(math.sqrt(N)) + 1):
  if (N - i) % i != 0:
    continue
  ans += int((N - i) / i)

print(ans)

Failing test case input:
1000000000000

Expected output:
2499686339916

Actual output:
2499687339915


Fixed submission (verdict: Accepted):
import math

N = int(input())

ans = 0
for i in range(1, int(math.sqrt(N)) + 1):
  if i > N / 2:
    continue
  tmp = int((N - i) / i)
  if (N - i) % i == 0 and N % tmp != 0 and tmp >= math.sqrt(N):
    ans += tmp

print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

result = 0
for i in range(1, int(N**0.5)+1):
  
  if N % i == 0 and (i ** 2 != N and i % 2 == 1):
    if (N - i) % i == 0:
      result += (N - i) / i

print(int(result))

Failing test case input:
1000010000000

Expected output:
2716922731275


Actual output:
1363794909035


Fixed submission (verdict: Accepted):
N = int(input())

result = 0
for i in range(1, int(N**0.5)+1):
  if N % i == 0:
    for j in set([i, N
      num = j - 1
      if num != 0 and N 
        result += num

print(int(result))
Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
ans=0
for i in range(1,N+1):
    if i*i>=N or i>(N**(1/2)):
        break
    if N%i==0:
        ans+=N

print(ans)

Failing test case input:
1110111100100

Expected output:
2417637625420


Actual output:
19981999801800


Fixed submission (verdict: Accepted):
N=int(input())
ans=0
for i in range(1,N+1):
    if i*i>=N:
        break
    if N%i==0 and (i+1!=N
        ans+=N

print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
limit = 0
n = int(input())
for v in range(1,n):
    if v*v >n:
        limit= v-1
        break
ans =0
for i in range(1,limit):
    a = n 
    if i * a + i == n:
        ans += a
print(ans)

Failing test case input:
1000011110110

Expected output:
1935071890544


Actual output:
0


Fixed submission (verdict: Accepted):
limit = 0
n = int(input())
for v in range(1,n):
    if v*v >n:
        limit= v-1
        break
ans =0
for i in range(1,limit+1):
    a = n 
    if n
        ans += a
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import sqrt
n=int(input())
s=0
for i in range(int(sqrt(n))):
    d,m=divmod(n,i+1)
    if m == 0:
        s += d-1
print(s)

Failing test case input:
1000000000000

Expected output:
2499686339916

Actual output:
2499687339915


Fixed submission (verdict: Accepted):
from math import sqrt
n=int(input())
s=0
for i in range(int(sqrt(n))):
    d,m=divmod(n,i+1)
    if m == 0:
        if d>1 and len(set(divmod(n,d-1))) == 1:
            s += d-1
print(s)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())
ans = 0
for i in range(2, math.ceil(n**0.5)):
    if n % i == 0:
        ans += n
ans += n
print(ans)

Failing test case input:
1010100010101

Expected output:
1802541194464


Actual output:
32323200323232


Fixed submission (verdict: Accepted):
n = int(input())
ans = 0
for i in range(1, int(n**0.5)+1):
    if n % i == 0:
        m = n
        if m != 0 and n 
            ans += n
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

def main():
    buf = input()
    N = int(buf)
    
    
    total = 0
    i = 1
    while i * i < N:
        if N % i == 0:
            div = N 
            total += div
        i += 1
    print(total)


if __name__ == '__main__':
    main()


Failing test case input:
1000000100000

Expected output:
2684487732013


Actual output:
72000007200000


Fixed submission (verdict: Accepted):

def main():
    buf = input()
    N = int(buf)
    
    
    total = 0
    i = 1
    while i * i < N:
        if N % i == 0:
            div = N 
            if N 
                total += div
        i += 1
    print(total)


if __name__ == '__main__':
    main()
Problem: p03050
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n=int(input())
if int(n**(1/2))!=n**(1/2):
    a=int(n**(1/2))+1
else:
    a=int(n**(1/2))
ans=0
for i in range(1,a):
    if (n-i)%i==0 and n-i>=i:
        ans+=(n-i)
print(ans)

Failing test case input:
1001010000000

Expected output:
3384285524107


Actual output:
256258526063243


Fixed submission (verdict: Accepted):
n=int(input())
if int(n**(1/2))!=n**(1/2):
    a=int(n**(1/2))+1
else:
    a=int(n**(1/2))
ans=0
for i in range(1,a):
    if (n-i)%i==0 and n-i>=i and (n-i)
        ans+=(n-i)
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N = int(input())
count = 0 
X = 0
q = 2
while N >= X:
    if N%q==0 and N/q-1<N:
        count += N/q-1
    q += 1
    X = (q+1)*q+q
print(int(count))

Failing test case input:
1110111100101

Expected output:
1603984026418


Actual output:
493872926318


Fixed submission (verdict: Accepted):
N = int(input())
count = 0 
X = 0
q = 1
while N >= X:
    if N%q==0 and N/q-1<N and N/q-1!=1:
        count += N/q-1
    q += 1
    X = (q+1)*q+q
print(int(count))

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
import math
ans = 0
for k in range(1, int(math.sqrt(N) + 1)):
    
    if N % k == 0 and k ** 2 != N:
        ans += N 

print(ans - 1)


Failing test case input:
1010100010101

Expected output:
1802541194464


Actual output:
32323200323231


Fixed submission (verdict: Accepted):
N = int(input())
import math
ans = 0
for k in range(1, int(math.sqrt(N) + 1)):
    
    m = N 
    if m != 0:
        if N % k == 0 and N 
            ans += m

print(ans)

Problem: p03050
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
ans = 0
p = 1
while True:
    if p ** 2 >= n:
        break
    if (n - p) % p == 0:
        ans += (n - p) 
    p += 1

print(ans)

Failing test case input:
1110011001010

Expected output:
2085783880016


Actual output:
17760175007872


Fixed submission (verdict: Accepted):
n = int(input())
ans = 0
p = 1
while True:
    if p ** 2 >= n:
        break
    if (n - p) % p == 0 and n % ((n - p) 
        ans += (n - p) 
    p += 1

print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):





import sys
import math
input = sys.stdin.readline
N = int(input())




sum_ = 0


for i in range(1, int(math.sqrt(N))+1):
    if N%i == 0:
        
        sum_ += N/i-1
print(sum_)








Failing test case input:
1000101110101

Expected output:
1000109155900


Actual output:
1000109155900.0


Fixed submission (verdict: Accepted):





import sys


N = int(input())




sum_ = 0



rn = N**0.5
if rn%1 == 0:
    rn -= 1
for i in range(1, int(rn)+1):
    if N%i == 0 and i < N
        
        
        sum_ += N/i-1
print(int(sum_))
Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):





import sys
import math
input = sys.stdin.readline
N = int(input())




sum_ = 0


for i in range(1, int(math.sqrt(N))+1):
    if N%i == 0:
        
        sum_ += N/i-1
print(int(sum_))








Failing test case input:
1000000000000

Expected output:
2499686339916

Actual output:
2499687339915


Fixed submission (verdict: Accepted):





import sys


N = int(input())




sum_ = 0



rn = N**0.5
if rn%1 == 0:
    rn -= 1
for i in range(1, int(rn)+1):
    if N%i == 0 and i < N
        
        
        sum_ += N/i-1
print(int(sum_))

Problem: p03050
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n=int(input())
ans=0
for i in range(1,int(n**.5)):
  if n%i==0:ans+=(n-i)
print(ans)

Failing test case input:
1001101111111

Expected output:
1029900148010


Actual output:
6006606198010


Fixed submission (verdict: Accepted):
n=int(input())
ans=0
for i in range(1,int(n**.5+(n**.5%1!=0))):
  j=(n-i)
  if n%j==n
    ans+=j
print(ans)

Problem: p03050
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
from collections import *
import heapq
import math

import bisect
import copy
from itertools import permutations,accumulate,combinations,product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n=int(input())

ans=0

for i in range(int(n**0.5)):
    if (i+1)**2==n:
        continue
    if (n-(i+1))%(i+1)==0:
        ans+=(n-(i+1))
    
print(ans)

Failing test case input:
1110111001101

Expected output:
1649577497432


Actual output:
8880887995528


Fixed submission (verdict: Accepted):
import sys
from collections import *
import heapq
import math

import bisect
import copy
from itertools import permutations,accumulate,combinations,product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n=int(input())

ans=0

if n==1:
    print(0)
    quit()
for i in range(int(n**0.5)):
    x=(n-(i+1))
    if n
        ans+=x
    
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
ans=0
for i in range(1,int((n-1)**0.5)+1):
    if n%i==0:
        ans+=n
print(ans)

Failing test case input:
1110011000010

Expected output:
2910049733920


Actual output:
35520352000320


Fixed submission (verdict: Accepted):
n=int(input())
ans=0
for i in range(1,int((n-1)**0.5)+1):
    if n%i==0:
        if i+2<=n
            ans+=n
print(ans)
Problem: p03050
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())

imax = int(n**(1/2))
cnt = 0
for i in range(1,imax):
    if (n-i)%i == 0:
        cnt += (n-i)
print(cnt)


Failing test case input:
1000000000000

Expected output:
2499686339916

Actual output:
83999992517829


Fixed submission (verdict: Accepted):
n = int(input())

imax = int(n**(1/2))+1
cnt = 0
for i in range(1,imax):
    if (n-i)%i == 0:
        if i >= (n-1)
            continue
        cnt += (n-i)
print(cnt)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
ans = 0
for i in range(1,int(N**0.5)):
    if N%i == 0:
        ans += N
        
print(ans)

Failing test case input:
1000011010110

Expected output:
2902338651846


Actual output:
128001409294080


Fixed submission (verdict: Accepted):
N = int(input())
ans = 0
i = 1
while(True):
    if N
        break
    if N%i == 0:
        ans += N
    i += 1
        
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math as m


n = int(input())
ans = 0
for i in range(1,m.ceil(m.sqrt(n))):
    if n%i==0: ans += n

print(ans)


Failing test case input:
1010001110101

Expected output:
1042601972936


Actual output:
4040004440404


Fixed submission (verdict: Accepted):
import math as m


n = int(input())
ans = 0
for i in range(1,m.ceil(m.sqrt(n))):
    if n%i==0:
        if n
        ans += n

if n in [1,2]: ans = 0

print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
import math
ans = 0
for k in range(1, int(math.sqrt(N) + 1)):
    
    if N % k == 0 and k ** 2 != N:
        ans += N 

print(ans)


Failing test case input:
1010111010101

Expected output:
1010111010100


Actual output:
1010111010101


Fixed submission (verdict: Accepted):
N = int(input())
import math
ans = 0
for k in range(1, int(math.sqrt(N) + 1)):
    
    m = N 
    if m != 0:
        if N % k == 0 and N 
            ans += m

print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())
cnt = 0
a = 0
if math.sqrt(n)**2 - n == 0:
    a = int(math.sqrt(n))
else:
    a = int(math.sqrt(n)) + 1
for i in range(1,a):
    if (n-i) % i == 0:
        cnt += (n-i) 

print(cnt)

Failing test case input:
1000110010111

Expected output:
1000115398836


Actual output:
2000219834628


Fixed submission (verdict: Accepted):
import math
n = int(input())
cnt = 0

for i in range(1,int(math.sqrt(n)) + 1):
    if n % i == 0:
        if (n-i) 
            cnt += (n-i) 
print(cnt)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
count = 0 
X = 0
q = 1
while N >= X:
    if N%q==0 and N/q-1<N:
        count += N/q-1
    q += 1
    X = (q+1)*q+q
print(count)

Failing test case input:
1000011100000

Expected output:
2711381654379


Actual output:
2711381654379.0


Fixed submission (verdict: Accepted):
N = int(input())
count = 0 
X = 0
q = 1
while N >= X:
    if N%q==0 and N/q-1<N and N/q-1!=1:
        count += N/q-1
    q += 1
    X = (q+1)*q+q
print(int(count))
Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N = int(input())
ans = 0
for m in range(1,math.ceil(N**(1/2))):
  if (N-m)%m == 0 and m < (N-m)%m:
    ans += int((N-m)/m)

if N == 1:
  ans = 0
if N == 2:
  ans = 0
if N == 3:
  ans = 2
if N == 6:
  ans = 5
print(ans)    

Failing test case input:
1011111010110

Expected output:
2696986242599


Actual output:
0


Fixed submission (verdict: Accepted):
import math
N = int(input())
ans = 0
for m in range(1,math.ceil(N**(1/2))):
  if (N-m)%m == 0 and m < (N-m)
    ans += int((N-m)/m)

if N == 1:
  ans = 0
if N == 2:
  ans = 0
if N == 3:
  ans = 2
if N == 6:
  ans = 5
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N = int(input())
cnt = 0
for i in range(1,int(math.sqrt(N))+1):
	if N % i == 0:		
		if N / i == i:
			cnt += i-1
		else:
			cnt += N/i-1
print(int(cnt))

Failing test case input:
1000000000000

Expected output:
2499686339916

Actual output:
2499687339915


Fixed submission (verdict: Accepted):
import math
N = int(input())
cnt = 0
for i in range(1,int(math.sqrt(N))+1):
    if N % i == 0:
        m = N/i-1
        if m > i:
            cnt += m
print(int(cnt))

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
 
result = 0

for i in range(1, int(N**0.5*1.5)):
  if N % i == 0 and i ** 2 != N:
    if (N - i) % i == 0:
      result += (N - i) / i

print(int(result))

Failing test case input:
1001010000000

Expected output:
3384285524107


Actual output:
3384297231991


Fixed submission (verdict: Accepted):
N = int(input())

result = 0
for i in range(1, int(N**0.5)+1):
  if N % i == 0:
    for j in set([i, N
      num = j - 1
      if num != 0 and N 
        result += num

print(int(result))

Problem: p03050
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n=int(input())
ans=0
for i in range(1,int(n**.5+(n**.5%1!=0))):
  if n%i==0:ans+=(n-i)
print([ans,0][n==2])

Failing test case input:
1110001011010

Expected output:
2001822090976


Actual output:
8880008078648


Fixed submission (verdict: Accepted):
n=int(input())
ans=0
for i in range(1,int(n**.5+(n**.5%1!=0))):
  j=(n-i)
  if n%j==n
    ans+=j
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
ans = 0
for i in range(1, 1000000):
    if (n - i) % i == 0:
        a = (n - i) 
        if a and n % a:
            ans += a
print(ans)

Failing test case input:
1000010000000

Expected output:
2716922731275


Actual output:
127001255374283


Fixed submission (verdict: Accepted):
n = int(input())
a = []
for i in range(1, int(n ** 0.5) + 1):
    if n % i == 0:
        a.append(i - 1)
        if i != n 
            a.append(n 
ans = 0
for i in a:
    if i and n 
        ans += i
print(ans)
Problem: p03050
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())

ans = 0
for div in range(1, int(n**0.5) + 1):
    if (n - div)%div==0:
        ans += (n-div)
    
print(ans)

Failing test case input:
1010001110101

Expected output:
1042601972936


Actual output:
4040003789344


Fixed submission (verdict: Accepted):
n = int(input())

ans = 0
for div in range(1, int(n ** 0.5) + 1):
    if (n - div) % div == 0 and div < (n - div) 
        ans += (n - div) 

print(ans)

Problem: p03050
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import math


def main():
    N = int(input())
    if N <= 2:
        print(0)
        return
    sqrt = math.ceil(math.sqrt(N))
    ans = 0
    for x in range(1, sqrt):
        if N % x == 0:
            y = N 
            ans += y
    print(ans)


if __name__ == "__main__":
    main()


Failing test case input:
1000001110101

Expected output:
1546554666360


Actual output:
8000008880808


Fixed submission (verdict: Accepted):
import math


def main():
    N = int(input())
    sqrt = math.ceil(math.sqrt(N))
    ans = 0
    for x in range(1, sqrt):
        if N % x == 0:
            y = N 
            if N 
                ans += y
    print(ans)


if __name__ == "__main__":
    main()

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N = int(input())
result = 0

root = math.ceil(math.sqrt(N))
for i in range(root):
    if N % (i + 1) == 0:
        result += N 

print(result)

Failing test case input:
1001111010010

Expected output:
1801999818014


Actual output:
4004444040040


Fixed submission (verdict: Accepted):
import math
N = int(input())
result = 0

root = math.ceil(math.sqrt(N))
for i in range(root):
    if N % (i + 1) == 0 and (i + 1) + 1 < N 
        result += N 

print(result)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())

answer=0
import math
for m in range(1,math.floor(math.sqrt(N))):
    if N%m==0:
        answer+=N/m-1
print(answer)

Failing test case input:
1000110110111

Expected output:
1170984109816


Actual output:
1170984109816.0


Fixed submission (verdict: Accepted):
N=int(input())

answer=0
import math
for m in range(1,math.ceil(math.sqrt(N+1/4)-1/2)):
    if N%m==0:
       answer+=N/m-1
print(int(answer))

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

result = 0
for i in range(1, int(N**0.5)+1):
  if (N - i) % i == 0:
    result += (N - i) / i

print(int(result))

Failing test case input:
1000000000000

Expected output:
2499686339916

Actual output:
2499687339915


Fixed submission (verdict: Accepted):
N = int(input())

result = 0
for i in range(1, int(N**0.5)+1):
  if N % i == 0:
    for j in set([i, N
      num = j - 1
      if num != 0 and N 
        result += num

print(int(result))
Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


import math
N=int(input())
n=int(math.sqrt(N))
plist=[]
for i in range(1,n+1):
    if N%i == 0:
        plist.append(i)
        if i != int(N/i):
            plist.append(int(N/i))
ans=0
for x in plist:
    kari=int(N/x)-1
    if kari not in plist:
        ans+=kari
print(ans)
            


Failing test case input:
1001101000111

Expected output:
1002691121310


Actual output:
1002691639032


Fixed submission (verdict: Accepted):


import math
N=int(input())
n=int(math.sqrt(N))
plist=[]
for i in range(1,n+1):
    if N%i == 0:
        plist.append(i)
        if i != int(N/i):
            plist.append(int(N/i))
ans=0
for i in range(len(plist)):
    x=plist[i]
    kari=int(N/x)-1
    if kari == 0:
        pass
    else:
        q=int(N/kari)
        r=N%kari
        if q == r:
            ans+=kari
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

N = int(input())
ans = 0
for i in range(1,math.ceil(N**0.5)):
    if N%i == 0:
        ans += N
print(ans)


Failing test case input:
1110011010101

Expected output:
1268606180668


Actual output:
4440044040404


Fixed submission (verdict: Accepted):
N = int(input())

ans = 0
for i in range(1,int(N**0.5)+1):
    if N%i == 0 and N
        ans += N
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



N = int(input())
a = int(pow(N, 1/2))
ans = 0
for i in range(1,a):
    if (N - i) % i ==0 :
        ans += (N - i) 
        
print(ans)

Failing test case input:
1000000000000

Expected output:
2499686339916

Actual output:
83999992517829


Fixed submission (verdict: Accepted):


import math

N = int(input())
a = int(math.ceil(pow(N, 1/2)))
ans = 0
for i in range(1,a):
    if N % i == 0 and (N 
        ans += (N - i) 
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
ans = 0
for i in range(1,int(N**(0.5))):
    if N%i == 0:
        ans += N
print(ans)

Failing test case input:
1110011100101

Expected output:
1124196443356


Actual output:
4440044400404


Fixed submission (verdict: Accepted):
N = int(input())
ans = 0
for i in range(1,int(N**(0.5))+1):
    if N%i == 0 and N
        ans += N
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
ans = 0
for i in range(1,int(N**0.5)+1):
    if N%i == 0:
        ans += N
        
print(ans)

Failing test case input:
1100011000000

Expected output:
2999416055122


Actual output:
161701617000000


Fixed submission (verdict: Accepted):
N = int(input())
ans = 0
i = 1
while(True):
    if N
        break
    if N%i == 0:
        ans += N
    i += 1
        
print(ans)
Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import ceil
n = int(input())
if n == 1 or n == 2:
    print(0)
    exit()
res = 0
for i in range(1,int(ceil(n**0.5))):
    if n%i == 0:
        res += n
print(res)
     

Failing test case input:
1110011010101

Expected output:
1268606180668


Actual output:
4440044040404


Fixed submission (verdict: Accepted):
from math import ceil
n = int(input())
res = 0
for i in range(1,ceil(n**0.5)):
    if n%i == 0 and i < n
        res += n
print(res)

Problem: p03050
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math
n = int(input())
s = 0
if math.sqrt(n) == int(math.sqrt(n)):
  lim = int(math.sqrt(n))
else:
  lim = int(math.sqrt(n))+1
for i in range(1,lim):
  x = n-i
  if x%i == 0:
    s += x
print(s)


Failing test case input:
1100010100100

Expected output:
2402830009366


Actual output:
19800181768816


Fixed submission (verdict: Accepted):
import math
n = int(input())
s = 0
if math.sqrt(n) == int(math.sqrt(n)):
  lim = int(math.sqrt(n))
else:
  lim = int(math.sqrt(n))+1
for i in range(1,lim):
  x = n-i
  if x%i == 0 and x
    s += x
print(s)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



def main():
    n = int(input())
    ans = 0
    max_l = int(n ** 0.5)

    if max_l ** 2 == n:
        max_l -= 1

    for i in range(1, max_l + 1):
        if n % i == 0:
            ans += n 

    print(ans)


if __name__ == '__main__':
    main()


Failing test case input:
1001010000100

Expected output:
2393125689492


Actual output:
36036360003600


Fixed submission (verdict: Accepted):



def main():
    n = int(input())
    ans = 0

    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0 and (i ** 2) != n:
            m = n 

            if n 
                ans += m

    print(ans)


if __name__ == '__main__':
    main()

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())
ans = 0
for i in range(1, int(n**0.5)+1):
    n2 = n - i
    if n2 % i == 0:
        
        try:
            if abs(n/(n2/i) - i) < 0.98:
                ans += math.ceil(n2 / i)
        except:
            print(1)
            exit()
print(ans)


Failing test case input:
1100011010100

Expected output:
3320557691342


Actual output:
3320556640812


Fixed submission (verdict: Accepted):
import math
n = int(input())
ans = 0



for i in range(1, int(n**0.5)+1):
    n2 = n - i

    if n2 % i == 0:
        
        

        try:
            if n
                ans += math.ceil(n2 / i)
        except:
            pass

print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
ans=0
for i in range(1,int(N**0.5)+1):
    if N%i==0:
        ans+=N
if int(N**0.5)**2==N:
    ans-=int(N**0.5)-1
print(ans)

Failing test case input:
1001010100011

Expected output:
1334680133346


Actual output:
2002020200022


Fixed submission (verdict: Accepted):
N=int(input())
ans=0
if N==1:
    print(0)
    exit()
for i in range(1,int(N**0.5)+1):
    if N%i==0:
        m=N
        if N
            ans+=m
print(ans)
Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math as m


n = int(input())
ans = 0
for i in range(1,m.ceil(m.sqrt(n))):
    if n%i==0: ans += n

if n in [1,2]: ans = 0

print(ans)


Failing test case input:
1010100000001

Expected output:
1025176119402


Actual output:
2020200000002


Fixed submission (verdict: Accepted):
import math as m


n = int(input())
ans = 0
for i in range(1,m.ceil(m.sqrt(n))):
    if n%i==0:
        if n
        ans += n

if n in [1,2]: ans = 0

print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):





import sys
import math
input = sys.stdin.readline
N = int(input())




sum_ = 0


for i in range(1, int(math.sqrt(N))+2):
    if N%i == 0:
        
        sum_ += N/i-1
print(int(sum_))








Failing test case input:
1000000000000

Expected output:
2499686339916

Actual output:
2499687339915


Fixed submission (verdict: Accepted):





import sys


N = int(input())




sum_ = 0



rn = N**0.5
if rn%1 == 0:
    rn -= 1
for i in range(1, int(rn)+1):
    if N%i == 0 and i < N
        
        
        sum_ += N/i-1
print(int(sum_))

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
x = 0
for i in range(1,n+1):
  if (n-i)%i == 0:
    x += (n-i)
  if (n-i)/i<i:
    break
print(int(x))

Failing test case input:
1110101000101

Expected output:
1114985668016


Actual output:
4440402996424


Fixed submission (verdict: Accepted):
n = int(input())
x = 0
for i in range(1,n+1):
  if (n-i)
    break
  if (n-i)%i == 0:
    if (n-i)
      x += (n-i)
print(int(x))

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



N = int(input())
a = int(pow(N, 1/2) - 0.0001 ) + 1
ans = 0
for i in range(1,a):
    if (N - i) % i ==0 :
        ans += (N - i) 
print(ans)

Failing test case input:
1011110001000

Expected output:
3472264525502


Actual output:
194133095708414


Fixed submission (verdict: Accepted):


import math

N = int(input())
a = int(math.ceil(pow(N, 1/2)))
ans = 0
for i in range(1,a):
    if N % i == 0 and (N 
        ans += (N - i) 
print(ans)

Problem: p03050
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):


import sys
import math


def solve(n):
  ret = 0
  divs = []
  for i in range(1,int(math.sqrt(n))+1):
    if n%i == 0 and i**2!=n:
      ret += n
  return ret


if __name__ == "__main__":
  N = int(input())
  print(solve(N))

Failing test case input:
1101011100100

Expected output:
2466264864206


Actual output:
19818199801800


Fixed submission (verdict: Accepted):


import sys
import math


def solve(n):
  ret = 0
  for i in range(1,math.ceil(math.sqrt(n))):
    s,t = divmod(n, n
    if s==t:
      ret += n
  return ret


if __name__ == "__main__":
  N = int(input())
  print(solve(N))
Problem: p03050
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
ans= 0
for i in range(1, int(N**(1/2))+2):
    if not (N - i) % i:
        ans += (N - i)
print(ans)

Failing test case input:
1000111010101

Expected output:
1143109738524


Actual output:
4000443967668


Fixed submission (verdict: Accepted):
N = int(input())
ans= 0
for i in range(1, int(N**(1/2))+3):
    if not (N - i) % i and (N-i)
        ans += (N - i)
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
ans = 0

n = 1
while n*n < N:
    if N%n==0:
        ans += N
    n += 1
print(ans)

Failing test case input:
1010100010101

Expected output:
1802541194464


Actual output:
32323200323232


Fixed submission (verdict: Accepted):
N = int(input())
ans = 0

n = 1
while n*n < N:
    if N%n==0 and n < N
        ans += N
    n += 1
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N = int(input())

ans = 0

now = 1

while now ** 2 < N:

    if N % now == 0:

        ans += N 

    now += 1

print (ans)


Failing test case input:
1001101000111

Expected output:
1002691121310


Actual output:
4004404000444


Fixed submission (verdict: Accepted):
N = int(input())

ans = 0

now = 1

while now ** 2 <= N:

    if N % now == 0 and (N 

        ans += N 

    now += 1

print (ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
 
N = int(input())
d_list = []
 
for i in range(1, int(math.sqrt(N)) + 1):
  if N % i == 0:
    d_list.append(i)
    if i != math.sqrt(N):
      d_list.append(N / i)
 
output = sum(d_list) - 3 - (len(d_list) - 2)
print(int(output))

Failing test case input:
1110111100101

Expected output:
1603984026418


Actual output:
1603984068947


Fixed submission (verdict: Accepted):
import math
 
N = int(input())
d_list = []
 
for i in range(1, int(math.sqrt(N)) + 1):
  if N % i == 0:
    if i != 1:
      if (N 
        d_list.append(i)
    if i != math.sqrt(N):
      if (N 
        d_list.append(N / i)
 
output = sum(d_list) - len(d_list)
print(int(output))

Problem: p03050
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())

ans = 0
for i in range(1, int(n ** 0.5) + 1):
    if n % i == 0  and i ** 2 != n:
        ans += n 
print(ans)


Failing test case input:
1100011001000

Expected output:
2590568215851


Actual output:
70400704064000


Fixed submission (verdict: Accepted):
n = int(input())

ans = 0
for i in range(1, int(n ** 0.5) + 1):
    m = n 
    if m > 0 and n % i == 0 and n 
        ans += m
print(ans)

Problem: p03050
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
ans = 0

for x in range(1, int((N-1)**(1/2)+1)):
    if (N-x) % x == 0:
        ans += (N-x)
if N == 2:
    ans = 0
print(ans)


Failing test case input:
1000011110000

Expected output:
2820369961992


Actual output:
150001647681702


Fixed submission (verdict: Accepted):
N = int(input())
ans = 0
for x in range(1, int(N**(1/2)+2)):
    if (N-x) % x == 0:
        if (N-x)
            ans += (N-x)

print(ans)
Problem: p03050
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n = int(input())
ans = 0
for i in range(1,n):
    if i**2>n:
        break
    if (n-i)%i==0:
        ans += (n-i)
print(ans)

Failing test case input:
1001101111011

Expected output:
1446790837200


Actual output:
6006606641184


Fixed submission (verdict: Accepted):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n = int(input())
ans = 0
for i in range(1,n):
    if i**2>n:
        break
    if (n-i)%i==0 and (n-i)
        ans += (n-i)
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N = int(input())
sqrt_N = int(math.sqrt(float(N)))

ans = 0
prefnum = [N-1]

for i in range(2, sqrt_N+1):
  if( N % i == 0):
    quotient = (N/i)
    prefnum.append(i-1)
    if(quotient != i):
      prefnum.append(quotient-1)

for i in prefnum:
  ans = ans + (i -1)

print(int(ans))

Failing test case input:
1011111010101

Expected output:
1460493681254


Actual output:
1460493681259


Fixed submission (verdict: Accepted):
import math
N = int(input())
sqrtN = int(math.sqrt(float(N)))

ans = 0
prefnum = []

for div in range(1, sqrtN+1):
  if( N % div == 0):
    quot = int(N/div)
    if((quot-1) > div):
      prefnum.append(int(quot-1))
      
for i in prefnum:
  ans = ans + i

print(ans)

Problem: p03050
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())

ans = 0
for div in range(1, int(n**0.5)):
    if (n - div)%div==0:
        ans += (n-div)
    
print(ans)

Failing test case input:
1000010000000

Expected output:
2716922731275


Actual output:
128001264374283


Fixed submission (verdict: Accepted):
n = int(input())

ans = 0
for div in range(1, int(n ** 0.5) + 1):
    if (n - div) % div == 0 and div < (n - div) 
        ans += (n - div) 

print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N = int(input())
sqrt_N = int(math.sqrt(float(N)))

ans = 0
divisor = [N]

for i in range(2, sqrt_N):
  if( N % i == 0):
    quotient = (N/i)
    divisor.append(i)
    divisor.append(quotient)

for i in divisor:
  ans = ans + (i -1)

print(int(ans))

Failing test case input:
1000101000101

Expected output:
1175125305592


Actual output:
1175125363184


Fixed submission (verdict: Accepted):
import math
N = int(input())
sqrtN = int(math.sqrt(float(N)))

ans = 0
prefnum = []

for div in range(1, sqrtN+1):
  if( N % div == 0):
    quot = int(N/div)
    if((quot-1) > div):
      prefnum.append(int(quot-1))
      
for i in prefnum:
  ans = ans + i

print(ans)
Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = 0
n = int(input())
for m in range(1,int(n**.5)+1):
  if n%m == 0:
    s += n
if int(n**.5)**2 == n:
  s -= int(n**.5)-1
print(s)

Failing test case input:
1000011010100

Expected output:
2173907489452


Actual output:
36000396363600


Fixed submission (verdict: Accepted):
s = 0
n = int(input())
for m in range(1,int(n**.5)+1):
  if n%m == 0 and n
    s += n
print(s)

Problem: p03050
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n=int(input())
ans=0
for i in range(1,int(n**.5+1)):
  if n%i==0:ans+=(n-i)
if n==4:print(3)
elif n==2:print(0)
else:print(ans)

Failing test case input:
1100001001100

Expected output:
2387002172378


Actual output:
9900009009683


Fixed submission (verdict: Accepted):
n=int(input())
ans=0
for i in range(1,int(n**.5+(n**.5%1!=0))):
  j=(n-i)
  if n%j==n
    ans+=j
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


import math

N = int(input())
a = int(math.ceil(pow(N, 1/2)))
ans = 0
for i in range(1,a):
    if (N - i) % i ==0 :
        ans += (N - i) 
print(ans)

Failing test case input:
1000011010110

Expected output:
2902338651846


Actual output:
128001395385926


Fixed submission (verdict: Accepted):


import math

N = int(input())
a = int(math.ceil(pow(N, 1/2)))
ans = 0
for i in range(1,a):
    if N % i == 0 and (N 
        ans += (N - i) 
print(ans)

Problem: p03050
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())

def isSQ(x):
  for i in range(1,10**6+1):
    if i**2==x:
      return i
    elif i**2>x:
      return -1
  else:
    return -1

answer=0
root=isSQ(N)
if root==-1:
  for i in range(1,int(N**0.5)+1):
    if N%i==0:
      answer+=N
else:
  for i in range(1,root):
    if N%i==0:
      answer+=N

print(answer)

Failing test case input:
1001101010110

Expected output:
1801981818194


Actual output:
4004404040440


Fixed submission (verdict: Accepted):
N=int(input())

def isSQ(x):
  for i in range(1,10**6+1):
    if i**2==x:
      return i
    elif i**2>x:
      return -1
  else:
    return -1

answer=0
root=isSQ(N)
if root==-1:
  for i in range(1,int(N**0.5)+1):
    if N%i==0:
      ni=N
      if N
        answer+=ni
else:
  for i in range(1,root):
    if N%i==0:
      ni=N
      if N
        answer+=ni

print(answer)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):





import sys
import math

N = int(input())




sum_ = 0


for i in range(1, int(math.sqrt(N+0.5))+1):
    if N%i == 0:
        
        
        sum_ += N/i-1
print(int(sum_))








Failing test case input:
1000000000000

Expected output:
2499686339916

Actual output:
2499687339915


Fixed submission (verdict: Accepted):





import sys


N = int(input())




sum_ = 0



rn = N**0.5
if rn%1 == 0:
    rn -= 1
for i in range(1, int(rn)+1):
    if N%i == 0 and i < N
        
        
        sum_ += N/i-1
print(int(sum_))
Problem: p03050
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
from math import gcd
r = n
cou = 0
for i in range(1,int(r**0.5)+1):
  if n%i==0:
    b = n
    cou += b

    if i>2:
      c = i-1
      cou += c

print(cou)

Failing test case input:
1110101000101

Expected output:
1114985668016


Actual output:
4440405004380


Fixed submission (verdict: Accepted):
n = int(input())
from math import gcd
cou = 0
for i in range(1,int(n**0.5)+1):
  if n%i==0:
    b = n
    if b>=2 and n
      cou += b
    
    if i>2:
      c = i-1
      if n
        cou += c
print(cou)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
val = int(input())
res = 0
current = 1
while True:
    rest = val - current
    plus = math.floor(rest / current)
        
    if rest % current == 0:
        if plus * current + current == val:
            res += plus
    if current * current + current >= val:
        break
    current += 1
print(str(res))

Failing test case input:
1000000000000

Expected output:
2499686339916

Actual output:
2499687339915


Fixed submission (verdict: Accepted):
import math
val = int(input())
res = 0
current = 1
while True:
    rest = val - current
    plus = math.floor(rest / current)
    if plus == 0:
        break

    if math.floor(val / plus) == val % plus:
        res += plus
    if current * current + current >= val:
        break
    current += 1
print(str(res))

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())

total = 0
for i in range(int(n ** 0.5) + 1):
  if n % (i + 1) == 0:
    total += n 

print(total)

Failing test case input:
1001010000100

Expected output:
2393125689492


Actual output:
36036360003600


Fixed submission (verdict: Accepted):
from math import ceil
n = int(input())

total = 0
for i in range(ceil(n ** 0.5) + 1):
  if n % (i + 1) == 0:
    a = n 
    if a >= 2 and n 
      total += a

print(total)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
ans = 0
if N <= 2:
    print(0)
else:
    for i in range(1,int(N**(0.5))):
        if N%i == 0:
            ans += N
    print(ans)

Failing test case input:
1000100010111

Expected output:
1392718291672


Actual output:
8000800080888


Fixed submission (verdict: Accepted):
N = int(input())
ans = 0
for i in range(1,int(N**(0.5))+1):
    if N%i == 0 and N
        ans += N
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N=int(input())
ans=0
for i in range(1, math.ceil(N**0.5)):
    if N % i == 0:
        ans+=N
print(ans)

Failing test case input:
1110011000000

Expected output:
3146654438234


Actual output:
108781078000000


Fixed submission (verdict: Accepted):
import math
N=int(input())
ans=0
for i in range(1, math.ceil(N**0.5)):
    if N % i == 0:
        if i < N
            ans+=N
print(ans)
Problem: p03050
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
c = 0
for i in range(1, int(n**0.5)+1):
    if n % i == 0 and n / i + 1 >= i:
        c += int(n / i) - 1
print(c)

Failing test case input:
1000000000000

Expected output:
2499686339916

Actual output:
2499687339915


Fixed submission (verdict: Accepted):
n = int(input())
cnt = 0
for i in range(1, int(n**0.5)+1):
    if n % i == 0 and n / i - 1 > i:
        cnt += int(n / i) - 1
print(cnt)

Problem: p03050
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right

def cal_divisors(N):
    divisors = []
    i = 1
    while i*i < N:
        if N % i == 0:
            divisors.append(i)
        i += 1
    divisors.sort()
    return divisors

def main():
    N = int(input())
    l = cal_divisors(N)
    ans = 0
    for i in l:
        ans += N
    print(ans)

if __name__ == "__main__":
    main()


Failing test case input:
1010101110101

Expected output:
1021269904928


Actual output:
4040404440404


Fixed submission (verdict: Accepted):

from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right

def cal_divisors(N):
    divisors = []
    i = 1
    while i*i < N:
        if N % i == 0:
            divisors.append(i)
        i += 1
    divisors.sort()
    return divisors

def main():
    N = int(input())
    l = cal_divisors(N)
    ans = 0
    for i in l:
        if N
            ans += N
    print(ans)

if __name__ == "__main__":
    main()

Problem: p03050
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n=int(input())
ans=0
for i in range(1,int(n**.5+(n**.5%1!=0))):
  if n%i==0:ans+=(n-i)
print(ans) 

Failing test case input:
1001000100001

Expected output:
1117867505912


Actual output:
16016000189848


Fixed submission (verdict: Accepted):
n=int(input())
ans=0
for i in range(1,int(n**.5+(n**.5%1!=0))):
  j=(n-i)
  if n%j==n
    ans+=j
print(ans)

Problem: p03050
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):










def main():
    
    N = int(input())
    tmp=0
    i=1
    N2=min(N,8000000)
    
    for i in range(1,N2):
        
        mod=(N-i)%i
        if mod==0:
            tmp+=int((N-i)/i)
        i+=1
    print(int(tmp))
    
if __name__ == "__main__":
    main()

Failing test case input:
1100011001000

Expected output:
2590568215851


Actual output:
2590573585993


Fixed submission (verdict: Accepted):










def main():
    
    N = int(input())
    tmp=0
    i=1
    o=min(N,2000000)
    for i in range(1,o):
        mod=(N-i)%i
        if mod==0:
            if (i>=(N-i)/i):
                break
            tmp+=int((N-i)/i)
        i+=1
    print(int(tmp))
    
if __name__ == "__main__":
    main()
Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



N = int(input())
a = int(pow(N, 1/2))
ans = 0
for i in range(1,a+1):
    if (N - i) % i ==0 :
        ans += (N - i) 
        
print(ans)

Failing test case input:
1000110010111

Expected output:
1000115398836


Actual output:
2000219834628


Fixed submission (verdict: Accepted):


import math

N = int(input())
a = int(math.ceil(pow(N, 1/2)))
ans = 0
for i in range(1,a):
    if N % i == 0 and (N 
        ans += (N - i) 
print(ans)

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N = int(input())
ans = 0
for m in range(1,math.ceil(N**(1/2))):
  if (N-m)%m == 0:
    ans += int((N-m)/m)

if N == 1 or 2:
  ans = 0
if N == 3:
  ans = 2

print(ans)    

Failing test case input:
1110011000010

Expected output:
2910049733920


Actual output:
0


Fixed submission (verdict: Accepted):
import math
N = int(input())
ans = 0
for m in range(1,math.ceil(N**(1/2))):
  if (N-m)%m == 0 and m < (N-m)
    ans += int((N-m)/m)

if N == 1:
  ans = 0
if N == 2:
  ans = 0
if N == 3:
  ans = 2
if N == 6:
  ans = 5
print(ans)

Problem: p03050
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import math


def main():
    N = int(input())
    sqrt = math.ceil(math.sqrt(N))
    ans = 0
    for x in range(1, sqrt):
        if N % x == 0:
            y = N 
            ans += y
    print(ans)


if __name__ == "__main__":
    main()


Failing test case input:
1110101100100

Expected output:
2408919387208


Actual output:
9990909900900


Fixed submission (verdict: Accepted):
import math


def main():
    N = int(input())
    sqrt = math.ceil(math.sqrt(N))
    ans = 0
    for x in range(1, sqrt):
        if N % x == 0:
            y = N 
            if N 
                ans += y
    print(ans)


if __name__ == "__main__":
    main()

Problem: p03050
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())


ans = 0
for i in range(1, int(n**.5)+1):
    if n % i or i*i == n:
        continue
    ans += n 
print(ans)


Failing test case input:
1110111100100

Expected output:
2417637625420


Actual output:
19981999801800


Fixed submission (verdict: Accepted):
n = int(input())


ans = 0
for i in range(1, int(n**.5)+1):
    if n % i or i >= n 
        continue
    ans += n 
print(ans)

Problem: p03050
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N=int(input())
ans = 0
for r in range(1,int(N**(0.5)) +(int(N**(0.5))**2!=N)):
    if (N-r)%r==0:
        ans += (N-r)
print(ans)

Failing test case input:
1000011010001

Expected output:
1000140494786


Actual output:
2000022012278


Fixed submission (verdict: Accepted):
N=int(input())
ans = 0
for r in range(1,int(N**(0.5))+10):
    if (N-r)%r==0:
        m = (N-r)
        if m!=0 and r == N
            ans += m
print(ans)