Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b,c=map(int,input().split())
d=[]
for i in range(c+1):
    n=math.floor((a*i)/b)-a*(math.floor(i/b))
    d.append(n)
d=sorted(d)
print(d[-1])

Fixed submission:
import math
a,b,c=map(int,input().split())
if b>c:
    print(math.floor((a*c)/b)-a*(math.floor(c/b)))
else:
    print(math.floor((a*(b-1))/b)-a*(math.floor((b-1)/b)))

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    a,b,c=map(int,input().split())
    d=[]
    c=c+1
    for i in range(c):
        e=(a*i)//b-a*(i//b)
        d.append(e)
    print(max(d))
if __name__ == '__main__':
    main()


Fixed submission:
import math
a,b,c=map(int,input().split())
if b>c:
    print(math.floor((a*c)/b)-a*(math.floor(c/b)))
else:
    print(math.floor((a*(b-1))/b)-a*(math.floor((b-1)/b)))

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    a,b,c=map(int,input().split())
    d=[]
    c=c+1
    for i in range(c):
        e=(a*i)//b-a*(i//b)
        d.append(e)
    print(max(d))
if __name__ == '__main__':
    main()


Fixed submission:
import math
a,b,c=map(int,input().split())
if b>c:
    print(math.floor((a*c)/b)-a*(math.floor(c/b)))
else:
    print(math.floor((a*(b-1))/b)-a*(math.floor((b-1)/b)))

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    a,b,c=map(int,input().split())
    d=[]
    c=c+1
    for i in range(c):
        e=(a*i)//b-a*(i//b)
        d.append(e)
    print(max(d))
if __name__ == '__main__':
    main()


Fixed submission:
import math
a,b,c=map(int,input().split())
if b>c:
    print(math.floor((a*c)/b)-a*(math.floor(c/b)))
else:
    print(math.floor((a*(b-1))/b)-a*(math.floor((b-1)/b)))

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    a,b,c=map(int,input().split())
    d=[]
    for i in range(c+1):
        e=(a*i)//b-a*(i//b)
        d.append(e)
    print(max(d))
if __name__ == '__main__':
    main()


Fixed submission:
import math
a,b,c=map(int,input().split())
if b>c:
    print(math.floor((a*c)/b)-a*(math.floor(c/b)))
else:
    print(math.floor((a*(b-1))/b)-a*(math.floor((b-1)/b)))

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    a,b,c=map(int,input().split())
    d=[]
    for i in range(c+1):
        e=(a*i)//b-a*(i//b)
        d.append(e)
    print(max(d))
if __name__ == '__main__':
    main()


Fixed submission:
import math
a,b,c=map(int,input().split())
if b>c:
    print(math.floor((a*c)/b)-a*(math.floor(c/b)))
else:
    print(math.floor((a*(b-1))/b)-a*(math.floor((b-1)/b)))

Buggy python submission (verdict: Time Limit Exceeded):
a,b,c=map(int,input().split())
d=[]
for i in range(c+1):
    e=(a*i)//b-a*(i//b)
    d.append(e)
print(max(d))


Fixed submission:
import math
a,b,c=map(int,input().split())
if b>c:
    print(math.floor((a*c)/b)-a*(math.floor(c/b)))
else:
    print(math.floor((a*(b-1))/b)-a*(math.floor((b-1)/b)))

Buggy python submission (verdict: Time Limit Exceeded):
a,b,c=map(int,input().split())
d=[]
for i in range(c+1):
    e=(a*i)//b-a*(i//b)
    d.append(e)
print(max(d))


Fixed submission:
import math
a,b,c=map(int,input().split())
if b>c:
    print(math.floor((a*c)/b)-a*(math.floor(c/b)))
else:
    print(math.floor((a*(b-1))/b)-a*(math.floor((b-1)/b)))

Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b,c=map(int,input().split())
d=[]
for i in range(0,c+1):
    e=math.floor(a*i/b)-a*math.floor(i/b)
    d.append(e)
d.sort()
print(d[-1])


Fixed submission:
import math
a,b,c=map(int,input().split())
if b>c:
    print(math.floor((a*c)/b)-a*(math.floor(c/b)))
else:
    print(math.floor((a*(b-1))/b)-a*(math.floor((b-1)/b)))

Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b,c=map(int,input().split())
d=[]
for i in range(0,c+1):
    e=math.floor(a*i/b)-a*math.floor(i/b)
    d.append(e)
print(max(d))


Fixed submission:
import math
a,b,c=map(int,input().split())
if b>c:
    print(math.floor((a*c)/b)-a*(math.floor(c/b)))
else:
    print(math.floor((a*(b-1))/b)-a*(math.floor((b-1)/b)))

Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b,c=map(int,input().split())
d=[]
a=float(a)
b=float(b)
for i in range(0,c+1):
    e=int(math.floor(a*i/b)-a*math.floor(i/b))
    d.append(e)
print(max(d))


Fixed submission:
import math
a,b,c=map(int,input().split())
if b>c:
    print(math.floor((a*c)/b)-a*(math.floor(c/b)))
else:
    print(math.floor((a*(b-1))/b)-a*(math.floor((b-1)/b)))