Buggy python submission (verdict: Runtime Error):
import math
import numpy as np

A, B, N = map(int, input().split())

def check():
    x = np.arange(1, N+1)
    tmp = np.floor(A * (x/B) ) - (A * np.floor(x / B))
    print(int(max(tmp)))
        
check()


Fixed submission:
import math

A, B, N = map(int, input().split())

if N < B:
    x = N
else:
    x = B - 1

def check(x):
    return math.floor((A * x) / B)
            
print(check(x))

Buggy python submission (verdict: Runtime Error):
import math
import numpy as np

A, B, N = map(int, input().split())

def check():
    x = np.arange(1, N+1)
    tmp = np.floor(A * (x/B) ) - (A * np.floor(x / B))
    #ans = math.floor((A * x)/B) - (A*math.floor(x/b))
    print(int(max(tmp)))


def solve():
    ans = 0
    for x in range(1, N+1):
        tmpans = math.floor((A * x)/B) - (A * math.floor(x/B))
        ans = max(tmpans, ans)
    print(ans)
#solve()
check()


Fixed submission:
import math

A, B, N = map(int, input().split())

if N < B:
    x = N
else:
    x = B - 1

def check(x):
    return math.floor((A * x) / B)
            
print(check(x))

Buggy python submission (verdict: Runtime Error):
import math
import numpy as np

A, B, N = map(int, input().split())

def check():
    x = np.arange(1, N+1)
    tmp = np.floor((A * x)/B ) - (A * np.floor(x / B))
    #ans = math.floor((A * x)/B) - (A*math.floor(x/b))
    print(int(max(tmp)))


def solve():
    ans = 0
    for x in range(1, N+1):
        tmpans = math.floor((A * x)/B) - (A * math.floor(x/B))
        ans = max(tmpans, ans)
    print(ans)
#solve()
check()


Fixed submission:
import math

A, B, N = map(int, input().split())

if N < B:
    x = N
else:
    x = B - 1

def check(x):
    return math.floor((A * x) / B)
            
print(check(x))

Buggy python submission (verdict: Time Limit Exceeded):
import math
A, B, N = map(int, input().split())
ans = 0

if N > 10000:
    for x in range(N+1, int(N / 100), -1):
        tmpans = math.floor((A * x)/B) - (A * math.floor(x/B))
        ans = max(tmpans, ans)
    print(ans)
else:
    for x in range(1, N+1):
        tmpans = math.floor((A * x)/B) - (A * math.floor(x/B))
        ans = max(tmpans, ans)
    print(ans)


Fixed submission:
import math

A, B, N = map(int, input().split())

if N < B:
    x = N
else:
    x = B - 1

def check(x):
    return math.floor((A * x) / B)
            
print(check(x))

Buggy python submission (verdict: Time Limit Exceeded):
import math
A, B, N = map(int, input().split())
ans = 0

if N > 10000:
    for x in range(N+1, int(N/2), -1):
        tmpans = math.floor((A * x)/B) - (A * math.floor(x/B))
        ans = max(tmpans, ans)
    print(ans)
else:
    for x in range(1, N+1):
        tmpans = math.floor((A * x)/B) - (A * math.floor(x/B))
        ans = max(tmpans, ans)
    print(ans)


Fixed submission:
import math

A, B, N = map(int, input().split())

if N < B:
    x = N
else:
    x = B - 1

def check(x):
    return math.floor((A * x) / B)
            
print(check(x))

Buggy python submission (verdict: Time Limit Exceeded):
import math
A, B, N = map(int, input().split())
ans = 0


for x in range(1, N+1):
    tmpans = math.floor((A * x)/B) - (A * math.floor(x/B))
    ans = max(tmpans, ans)
print(ans)


Fixed submission:
import math

A, B, N = map(int, input().split())

if N < B:
    x = N
else:
    x = B - 1

def check(x):
    return math.floor((A * x) / B)
            
print(check(x))