Problem p02696 (python)

Fixed submission:
import math
b = list(map(int,input().split()))
ans=0
check=0
if b[2]>b[1]-1:
    check = math.floor((b[0]*(b[1]-1))/b[1]) - b[0]*math.floor((b[1]-1)/b[1])
else:
    check = math.floor((b[0]*b[2])/b[1]) - b[0]*math.floor(b[2]/b[1])
if check>ans:
    ans=check
print(ans)

Buggy submission (verdict: Runtime Error):
import math
b = list(map(int,input().split()))
if b[2]>b[1]-1:
    check = math.floor((b[0]*(b[1]-1))/b[1]) - b[0]*math.floor((b[1]-1)/b[1])
else:
    check = math.floor((b[0]*b[2])/b[1]) - b[0]*math.floor(b[2]/b[1])
print(ans)

Buggy submission (verdict: Runtime Error):
import math
b = list(map(int,input().split()))
ans=0
check=0
i=0
A =0
C=b[1]
max = math.floor(b[2]/b[1])
if b[2]+1<10000:
    for i in range(b[2]+1):
        if b[2]-i <0:
            break
        check = math.floor((b[0]*(b[2]-i))/b[1]) - b[0]*math.floor((b[2]-i)/b[1])
        if check > ans:
            ans=check
else:
    for i in range(1,max+1):
        A=b[1]-1
        if A>0:
            check = math.floor((b[0]*A)/C) - b[0]*math.floor(A/C)
            if check > ans:
                ans=check
        b[1]+=b[1]
print(ans)

Buggy submission (verdict: Runtime Error):
import math
b = list(map(int,input().split()))
ans=0
check=0
A=0
C=b[1]
max = math.floor(b[2]/b[1])
if max == 0:
    if b[1]-1>0:
        check = math.floor((b[0]*(b[1]-1))/b[1]) - b[0]*math.floor((b[1]-1)/b[1])
        if check > ans:
            ans=check
else:
    for i in range(max+1):
        A=b[1]-1
        if A>0:
            check = math.floor((b[0]*A)/C) - b[0]*math.floor(A/C)
            if check > ans:
                ans=check
        b[1]+=b[1]
print(ans)

Buggy submission (verdict: Runtime Error):
import math
b = list(map(int,input().split()))
ans=0
check=0
A=0
C=b[1]
max = math.floor(b[2]/b[1])

    for i in range(max):
        A=b[1]-1
        if A>0:
            check = math.floor((b[0]*A)/C) - b[0]*math.floor(A/C)
            if check > ans:
                ans=check
        b[1]+=b[1]
print(ans)

Buggy submission (verdict: Runtime Error):
import math
b = list(map(int,input().split()))
ans=0
check=0
A=0
C=b[1]
max = math.floor(b[2]/b[1])
if max == 0:
    if b[1]-1>0:
        check = math.floor((b[0]*(b[1]-1))/b[1]) - b[0]*math.floor((b[1]-1)/b[1])
        if check > ans:
            ans=check
else:
    for i in range(max):
        A=b[1]-1
        if A>0:
            check = math.floor((b[0]*A)/C) - b[0]*math.floor(A/C)
            if check > ans:
                ans=check
        b[1]+=b[1]
print(ans)

Buggy submission (verdict: Runtime Error):
import math
b = list(map(int,input().split()))
ans=0
check=0
max = b[2]//b[1]
if max <=0:
    check = math.floor((b[0]*(b[1]-1))/b[1]) - b[0]*math.floor((b[1]-1)/b[1])
    ans = 0
    if check > ans:
        ans=check
else:
    for i in range(max):
        A=b[1]-1
        if A>0:
            check = math.floor((b[0]*A)/C) - b[0]*math.floor(A/C)
            if check > ans:
                ans = check
        b[1]+=b[1]
print(ans)

Buggy submission (verdict: Runtime Error):
import math
b = list(map(int,input().split()))
ans=0
check=0
A=0
C=b[1]
max = b[2]//b[1]

for i in range(max+1):
    A=b[1]-1
    if A>0:
        check = math.floor((b[0]*A)/C) - b[0]*math.floor(A/C)
        if check > ans:
            ans=check
    b[1]+=b[1]
print(ans)

Buggy submission (verdict: Runtime Error):
import math
b = list(map(int,input().split()))
ans=0
check=0
i=0
A=0
B=0
C=b[1]
max = b[2]//b[1]
if max==0 or max==1:
    for i in range(b[2]+1):
        if b[2]-i <=0:
            break
        check = math.floor((b[0]*(b[2]-i))/b[1]) - b[0]*math.floor((b[2]-i)/b[1])
        if check > ans:
            ans=check

else:
    for i in range(1,max+1):
        A=b[1]-1
        
        check = math.floor((b[0]*A)/C) - b[0]*math.floor(A/C)
        if check > ans:
            ans=check
        b[1]+=b[1]
print(ans)

Buggy submission (verdict: Runtime Error):
import math
b = list(map(int,input().split()))
ans=0
check=0
i=0
A=0
B=0
C=b[1]
max = b[2]//b[1]
if max==0 or max==1:
    for i in range(b[2]+1):
        if b[2]-i <=0:
            break
        check = math.floor((b[0]*(b[2]-i))/b[1]) - b[0]*math.floor((b[2]-i)/b[1])
        if check > ans:
            ans=check

else:
    for i in range(1,max+1):
        A=b[1]-1
        B=b[1]+1
        check = math.floor((b[0]*A)/C) - b[0]*math.floor(A/C)
        if check > ans:
            ans=check
        check = math.floor((b[0]*B)/C) - b[0]*math.floor(B/C)
        if check > ans:
            ans=check
        B[1]+=b[1]
print(ans)

Buggy submission (verdict: Runtime Error):
import math
b = list(map(int,input().split()))
ans=0
check=0
i=0
A=0
B=0
C=b[1]
max = b[2]//b[1]
if max==0:
    for i in range(b[2]+1):
        if b[2]-i <0:
            break
        check = math.floor((b[0]*(b[2]-i))/b[1]) - b[0]*math.floor((b[2]-i)/b[1])
        if check > ans:
            ans=check

else:
    for i in range(1,max+1):
        A=b[1]-1
        B=b[1]+1
        check = math.floor((b[0]*A)/C) - b[0]*math.floor(A/C)
        if check > ans:
            ans=check
        check = math.floor((b[0]*B)/C) - b[0]*math.floor(B/C)
        if check > ans:
            ans=check
        B[1]+=b[1]
print(ans)