Buggy python submission (verdict: Runtime Error):
import math
a,b,n = map(int,input().split())
#li = []
 
#for x in range(n+1):
ans = (math.floor((a*(n))/b) - (a * math.floor(n/b)))

 
#print(max(li))
if max(li) > n:
    print(0)
else:
    print(max(li))


Fixed submission:
import math
 
A, B, N = map(int, input().split())
 
 
ans1 = 0
 
if N > B - 1:
    x = B-1
    print(int((A * x) / B) - A * int(x / B))
elif N <= B - 1:
    x = N
    print(int((A * x) / B) - A * int(x / B))

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
a,b,n = map(int,input().split())
li = []
append = li.append
 
#for x in range(n+1):
#    append(int((a*(x))/b) - a * int(x/b))
#print(max(li))
def f(x):
    return int((a*(x))/b) - a * int(x/b) 
li = [f(x) for x in range(n+1)]
print(max(li))

Fixed submission:
import math
 
A, B, N = map(int, input().split())
 
 
ans1 = 0
 
if N > B - 1:
    x = B-1
    print(int((A * x) / B) - A * int(x / B))
elif N <= B - 1:
    x = N
    print(int((A * x) / B) - A * int(x / B))

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
a,b,n = map(int,input().split())
li = []
append = li.append
 
#for x in range(n+1):
#    append(int((a*(x))/b) - a * int(x/b))
#print(max(li))
def f(x):
    return int((a*(x))/b) - a * int(x/b) 
li = [f(x) for x in range(n+1)]
print(max(li))

Fixed submission:
import math
 
A, B, N = map(int, input().split())
 
 
ans1 = 0
 
if N > B - 1:
    x = B-1
    print(int((A * x) / B) - A * int(x / B))
elif N <= B - 1:
    x = N
    print(int((A * x) / B) - A * int(x / B))

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
a,b,n = map(int,input().split())
li = []
append = li.append

#for x in range(n+1):
#    append(int((a*(x))/b) - a * int(x/b))
#print(max(li))
li = [(int((a*(x))/b) - a * int(x/b)) for x in range(n+1)]
print(max(li))

Fixed submission:
import math
 
A, B, N = map(int, input().split())
 
 
ans1 = 0
 
if N > B - 1:
    x = B-1
    print(int((A * x) / B) - A * int(x / B))
elif N <= B - 1:
    x = N
    print(int((A * x) / B) - A * int(x / B))

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
a,b,n = map(int,input().split())
li = []
append = li.append
siki = int((a*(x))/b) - a * int(x/b)
for x in range(n+1):
    append(siki)
print(max(li))

Fixed submission:
import math
 
A, B, N = map(int, input().split())
 
 
ans1 = 0
 
if N > B - 1:
    x = B-1
    print(int((A * x) / B) - A * int(x / B))
elif N <= B - 1:
    x = N
    print(int((A * x) / B) - A * int(x / B))

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
a,b,n = map(int,input().split())
li = []
append = li.append
for x in range(n+1):
    append(int((a*(x))/b) - a * int(x/b))
print(max(li))

Fixed submission:
import math
 
A, B, N = map(int, input().split())
 
 
ans1 = 0
 
if N > B - 1:
    x = B-1
    print(int((A * x) / B) - A * int(x / B))
elif N <= B - 1:
    x = N
    print(int((A * x) / B) - A * int(x / B))

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
a,b,n = map(int,input().split())
li = []

for x in range(n+1):
    li.append(int((a*(x))/b) - a * int(x/b))
print(max(li))

Fixed submission:
import math
 
A, B, N = map(int, input().split())
 
 
ans1 = 0
 
if N > B - 1:
    x = B-1
    print(int((A * x) / B) - A * int(x / B))
elif N <= B - 1:
    x = N
    print(int((A * x) / B) - A * int(x / B))

Buggy python submission (verdict: Time Limit Exceeded):
import math
import sys
input = sys.stdin.readline
a,b,n = map(int,input().split())
li = []

for x in range(n+1):
    li.append(int((a*(x))/b) - a * int(x/b))
print(max(li))

Fixed submission:
import math
 
A, B, N = map(int, input().split())
 
 
ans1 = 0
 
if N > B - 1:
    x = B-1
    print(int((A * x) / B) - A * int(x / B))
elif N <= B - 1:
    x = N
    print(int((A * x) / B) - A * int(x / B))

Buggy python submission (verdict: Time Limit Exceeded):
import math
import sys
input = sys.stdin.readline
a,b,n = map(int,input().split())
li = []

for x in range(n+1):
    li.append(math.floor((a*(x))/b) - a * math.floor(x/b))
print(max(li))

Fixed submission:
import math
 
A, B, N = map(int, input().split())
 
 
ans1 = 0
 
if N > B - 1:
    x = B-1
    print(int((A * x) / B) - A * int(x / B))
elif N <= B - 1:
    x = N
    print(int((A * x) / B) - A * int(x / B))

Buggy python submission (verdict: Time Limit Exceeded):
import math
import sys
input = sys.stdin.readline
a,b,n = map(int,input().split())
li = []

for x in range(n+1):
    li.append(math.floor((a*(x))/b) - a * math.floor(x/b))
print(max(li))

Fixed submission:
import math
 
A, B, N = map(int, input().split())
 
 
ans1 = 0
 
if N > B - 1:
    x = B-1
    print(int((A * x) / B) - A * int(x / B))
elif N <= B - 1:
    x = N
    print(int((A * x) / B) - A * int(x / B))

Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b,n = map(int,input().split())
li = []

for x in range(n+1):
    li.append(math.floor((a*(x))/b) - a * math.floor(x/b))
print(max(li))

Fixed submission:
import math
 
A, B, N = map(int, input().split())
 
 
ans1 = 0
 
if N > B - 1:
    x = B-1
    print(int((A * x) / B) - A * int(x / B))
elif N <= B - 1:
    x = N
    print(int((A * x) / B) - A * int(x / B))