Buggy python submission (verdict: Runtime Error):

import numpy as np
import math
a,b,n=map(int,input().split())

x=np.arange(1,math.log10(n),0.01)
s1=np.floor(a*x*10**math.log10(n)/b)
s2=a*np.floor(x*10**math.log10(n)/b)
s=s1-s2

if n<b:s=np.array(math.floor(a*n/b)-a*math.floor(n/b))
print(int(np.max(s)))

Fixed submission:
a, b, n = list(map(int, input().split()))
x = min(b - 1, n) # b-1がいいけど、上限 nの制約あり
ans = int(a * x / b)
print(ans)

Buggy python submission (verdict: Runtime Error):

import numpy as np
a,b,n=map(int,input().split())

x=np.arange(1,n+1)

s1=np.floor(a*x/b)
s2=a*np.floor(x/b)
s=s1-s2
print(int(np.max(s)))

Fixed submission:
a, b, n = list(map(int, input().split()))
x = min(b - 1, n) # b-1がいいけど、上限 nの制約あり
ans = int(a * x / b)
print(ans)

Buggy python submission (verdict: Runtime Error):

import numpy as np
a,b,n=map(int,input().split())

x=np.arange(1,n+1)

s1=np.floor(a*x/b)
s2=a*np.floor(x/b)
s=s1-s2
print(int(np.max(s)))

Fixed submission:
a, b, n = list(map(int, input().split()))
x = min(b - 1, n) # b-1がいいけど、上限 nの制約あり
ans = int(a * x / b)
print(ans)

Buggy python submission (verdict: Runtime Error):

import numpy as np
a,b,n=map(int,input().split())

x=np.arange(1,n+1)

s1=np.floor((a/b)*x)
s2=a*np.floor(x/b)
s=s1-s2
print(int(np.max(s)))

Fixed submission:
a, b, n = list(map(int, input().split()))
x = min(b - 1, n) # b-1がいいけど、上限 nの制約あり
ans = int(a * x / b)
print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np
a,b,n=map(int,input().split())

x=np.arange(1,n+1)

s1=np.floor((a/b)*x)
s2=a*np.floor(x/b)
s=s1-s2
print(np.max(s))

Fixed submission:
a, b, n = list(map(int, input().split()))
x = min(b - 1, n) # b-1がいいけど、上限 nの制約あり
ans = int(a * x / b)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):

"""
=int(input())
=map(int,input().split())
=list(map(int,input().split()))

# アレイ import numpy as np =np.array(list(map(float,input().split())))

# 文字列 =list(str(input()).split(" " or ","))

# 一文字＆連番(縦横可能) =map(int, open(0).read().split())

# 2-d list
lis=[[] for _ in range(M)]
for i in range(M):
    lis[i] = list(map(int,input().split()[0:]))

# Each list
N = int(input())
a = [0] * N
b = [0] * N
c = [0] * N
for i in range(N):
    a[i], b[i], c[i] = map(int, input().split())
"""

import math
a,b,n=map(int,input().split())
kai=[]
for i in range(b,n+1,b):
    k=math.floor(a*i/b)-a*math.floor(i/b)
    kai.append(k)
    k=math.floor(a*(i-1)/b)-a*math.floor((i-1)/b)
    kai.append(k)

if len(kai)==0:
    kai.append(math.floor(a*n/b)-a*math.floor(n/b))
print(max(kai))


Fixed submission:
a, b, n = list(map(int, input().split()))
x = min(b - 1, n) # b-1がいいけど、上限 nの制約あり
ans = int(a * x / b)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):

"""
=int(input())
=map(int,input().split())
=list(map(int,input().split()))

# アレイ import numpy as np =np.array(list(map(float,input().split())))

# 文字列 =list(str(input()).split(" " or ","))

# 一文字＆連番(縦横可能) =map(int, open(0).read().split())

# 2-d list
lis=[[] for _ in range(M)]
for i in range(M):
    lis[i] = list(map(int,input().split()[0:]))

# Each list
N = int(input())
a = [0] * N
b = [0] * N
c = [0] * N
for i in range(N):
    a[i], b[i], c[i] = map(int, input().split())
"""

import math
a,b,n=map(int,input().split())
kai=[]
for i in range(b,n+1,b):
    k=math.floor(a*i/b)-a*math.floor(i/b)
    kai.append(k)
    k=math.floor(a*(i-1)/b)-a*math.floor((i-1)/b)
    kai.append(k)

if len(kai)==0:
    kai.append(math.floor(a*n/b)-a*math.floor(n/b))
print(max(kai))


Fixed submission:
a, b, n = list(map(int, input().split()))
x = min(b - 1, n) # b-1がいいけど、上限 nの制約あり
ans = int(a * x / b)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):

"""
=int(input())
=map(int,input().split())
=list(map(int,input().split()))

# アレイ import numpy as np =np.array(list(map(float,input().split())))

# 文字列 =list(str(input()).split(" " or ","))

# 一文字＆連番(縦横可能) =map(int, open(0).read().split())

# 2-d list
lis=[[] for _ in range(M)]
for i in range(M):
    lis[i] = list(map(int,input().split()[0:]))

# Each list
N = int(input())
a = [0] * N
b = [0] * N
c = [0] * N
for i in range(N):
    a[i], b[i], c[i] = map(int, input().split())
"""
import math
a,b,n=map(int,input().split())
kai=[]
for i in range(1,n+1):
    k=math.floor(a*i/b)-a*math.floor(i/b)
    kai.append(k)
print(max(kai))

Fixed submission:
a, b, n = list(map(int, input().split()))
x = min(b - 1, n) # b-1がいいけど、上限 nの制約あり
ans = int(a * x / b)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):

"""
=int(input())
=map(int,input().split())
=list(map(int,input().split()))

# アレイ import numpy as np =np.array(list(map(float,input().split())))

# 文字列 =list(str(input()).split(" " or ","))

# 一文字＆連番(縦横可能) =map(int, open(0).read().split())

# 2-d list
lis=[[] for _ in range(M)]
for i in range(M):
    lis[i] = list(map(int,input().split()[0:]))

# Each list
N = int(input())
a = [0] * N
b = [0] * N
c = [0] * N
for i in range(N):
    a[i], b[i], c[i] = map(int, input().split())
"""
import math
a,b,n=map(int,input().split())
kai=[]
for i in range(1,n+1):
    k=math.floor(a*i/b)-a*math.floor(i/b)
    kai.append(k)
print(max(kai))

Fixed submission:
a, b, n = list(map(int, input().split()))
x = min(b - 1, n) # b-1がいいけど、上限 nの制約あり
ans = int(a * x / b)
print(ans)