Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
⌀
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
8 values
p02696
import math a, b, n = map(int, input().split()) x = min(b, n) ans = math.floor(a * x / b) - a * math.floor(x / b) print(ans)
import math a, b, n = map(int, input().split()) x = min(b - 1, n) ans = math.floor(a * x / b) - a * math.floor(x / b) print(ans)
[ "assignment.change" ]
442,408
442,409
u934119021
python
p02696
a,b,n=map(int,input().split()) max=0 if b>=n: x=n ans=(a*x)//b -a*(x//b) else: x=b-1 ans=(a*x)//b -a*(x//b) print(ans)
# a,b,n=map(int,input().split()) # max=0 # for i in range(1,n+1): # if a%b*i%b<i%b: # ans=a*i//b -a*(i//b) # if max<ans: # max=ans # print(max) a,b,n=map(int,input().split()) max=0 if b>n: x=n ans=(a*x)//b -a*(x//b) else: x=b-1 ans=(a*x)//b -a*(x//b) print(ans)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,410
442,411
u146066372
python
p02696
A, B, N = map(int, input().split()) x = B-1 if B-1 > N else N print(A*x//B-A*(x//B))
A, B, N = map(int, input().split()) x = N if B-1 > N else B-1 print(A*x//B-A*(x//B))
[ "assignment.value.change", "expression.operation.binary.change", "expression.operation.binary.remove" ]
442,422
442,423
u530844517
python
p02696
A, B, N = map(int, input().split()) x = B-1 if B-1 > N else N-1 print(A*x//B-A*(x//B))
A, B, N = map(int, input().split()) x = N if B-1 > N else B-1 print(A*x//B-A*(x//B))
[ "assignment.value.change", "expression.operation.binary.change", "expression.operation.binary.remove", "identifier.change" ]
442,424
442,423
u530844517
python
p02696
A, B, N = map(int, input().split()) x = B-1 if B > N else N-1 print(A*x//B-A*(x//B))
A, B, N = map(int, input().split()) x = N if B-1 > N else B-1 print(A*x//B-A*(x//B))
[]
442,425
442,423
u530844517
python
p02696
a,b,n = map(int, input().split()) if n<=b-1: x=n else: x=b print((a*x)//b)
a,b,n = map(int, input().split()) if n<b-1: x=n else: x=b-1 print((a*x)//b)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,443
442,444
u812354010
python
p02696
A,B,N=map(int,input().split()) if B>N: print(A*N//B) else: print(A*(B-1)*N)
A,B,N=map(int,input().split()) if B>N: print(A*N//B) else: print(A*(B-1)//B)
[]
442,476
442,477
u185806788
python
p02696
A, B, N = map(int, input().split()) x = min(N,B-1) return A*x//B-A*(x//B)
A, B, N = map(int, input().split()) x = min(N,B-1) print(A*x//B-A*(x//B))
[ "function.return_value.change", "call.arguments.change" ]
442,480
442,481
u311488536
python
p02696
A, B, N = map(int, input().split()) x = max(N, B-1) print((A*x//B) - A*(x//B))
A, B, N = map(int, input().split()) x = min(N, B-1) print((A*x//B) - A*(x//B))
[ "misc.opposites", "assignment.value.change", "identifier.change", "call.function.change" ]
442,482
442,483
u377834804
python
p02696
a,b,n = map(int,input().split()) if b < n: k = b-1 else: k = n m = int(k*a/b) - a*int(k/b) print(m)
a,b,n = map(int,input().split()) if b <= n: k = b-1 else: k = n m = int(k*a/b) - a*int(k/b) print(m)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,486
442,487
u133240057
python
p02696
a,b,n = map(int,input().split()) if b >n: k = b-1 else: k = n m = int(k*a/b) - a*int(k/b) print(m)
a,b,n = map(int,input().split()) if b <= n: k = b-1 else: k = n m = int(k*a/b) - a*int(k/b) print(m)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,488
442,487
u133240057
python
p02696
import sys input = sys.stdin.readline from math import floor A, B, N = map(int, input().split()) if N<=B: print(floor(A/B*N)) else: print(floor(A/B*(B-1)))
import sys input = sys.stdin.readline from math import floor A, B, N = map(int, input().split()) if N<B: print(floor(A/B*N)) else: print(floor(A/B*(B-1)))
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,493
442,494
u367701763
python
p02696
a, b, n = map(int, input().split()) c = int(a*n/b) - a*int(n/b) if n < b: print(c) else: c = int(a*(n-1)/b) - a*int((n-1)/b) print(c)
a, b, n = map(int, input().split()) c = int(a*n/b) - a*int(n/b) if n < b: print(c) else: c = int(a*(b-1)/b) - a*int((b-1)/b) print(c)
[ "assignment.value.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
442,511
442,512
u277104886
python
p02696
import sys sys.stdin.readline A, B, N = map(int, input().split()) ans = 0 if N >= B: ans = B-1 else: ans = N print(A * N //B)
import sys sys.stdin.readline A, B, N = map(int, input().split()) ans = 0 if N >= B: ans = B-1 else: ans = N print(A * ans //B)
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
442,515
442,516
u750651325
python
p02696
a,b,n=map(int,input().split()) if n>=b: x=b-1 fl1=a*x//b fl2=a*(x//b) else: fl1=a*(n//b) fl2=a*(n//b) ans = fl1-fl2 print(ans)
a,b,n=map(int,input().split()) if n>=b: x=b-1 fl1=a*x//b fl2=a*(x//b) else: fl1=a*n//b fl2=a*(n//b) ans = fl1-fl2 print(ans)
[]
442,517
442,518
u035453792
python
p02696
A, B, N = list(map(int,input().split())) def f(x): return math.floor(A * x / B) - A * math.floor(x / B) if B - 1 <= N: ans = f(B - 1) else: ans = f(N) print(ans)
import math A, B, N = list(map(int,input().split())) def f(x): return math.floor(A * x / B) - A * math.floor(x / B) if B - 1 <= N: ans = f(B - 1) else: ans = f(N) print(ans)
[]
442,530
442,531
u885634168
python
p02696
a, b, n = [int(x) for x in input().split()] def f(x): return a*x//b - a *(x//b) print(f(min(b, n - 1)))
a, b, n = [int(x) for x in input().split()] def f(x): return a*x//b - a *(x//b) print(f(min(b - 1, n)))
[ "call.arguments.change", "call.arguments.add" ]
442,532
442,533
u161411695
python
p02696
import math A, B, N = map(int, input().split()) if B > N: x = N else: x = B print(math.floor(A * x / B) - A * math.floor(x/B))
import math A, B, N = map(int, input().split()) if B > N: x = N else: x = B - 1 print(math.floor(A * x / B) - A * math.floor(x/B))
[ "assignment.change" ]
442,534
442,535
u891516200
python
p02696
import math import collections def f(a,b,x): return math.floor((a*x)/b) - a*math.floor(x/b) a,b,n=map(int, input().split()) dd = collections.defaultdict(int) print(f(a,b,min(b-1,x)))
import math import collections def f(a,b,x): return math.floor((a*x)/b) - a*math.floor(x/b) a,b,n=map(int, input().split()) dd = collections.defaultdict(int) print(f(a,b,min(b-1,n)))
[ "identifier.change", "call.arguments.change" ]
442,536
442,537
u685983477
python
p02696
import math a, b, n = map(int,input().split()) # N = int(input()) # al = list(map(int,input().split())) lst = [] if b >= n: x = n else: x = b-1 ans = math.floor(a * x / b) - a * math.floor(x / b) print(ans)
import math a, b, n = map(int,input().split()) # N = int(input()) # al = list(map(int,input().split())) lst = [] if b > n: x = n else: x = b-1 ans = math.floor(a * x / b) - a * math.floor(x / b) print(ans)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,538
442,539
u212328220
python
p02696
import sys import math def IL(): return map(int,sys.stdin.readline().rstrip().split()) def Main(): a,b,n = IL() x = min(b,n) print(math.floor(a*x/b)-a*math.floor(x/b)) return if __name__=='__main__': Main()
import sys import math def IL(): return map(int,sys.stdin.readline().rstrip().split()) def Main(): a,b,n = IL() x = min(b-1,n) print(math.floor(a*x/b)-a*math.floor(x/b)) return if __name__=='__main__': Main()
[ "assignment.change" ]
442,550
442,551
u844895214
python
p02696
a,b,n=map(int,input().split()) def f(a,b,x): return (a*x)//b - a*(x//b) print(f(min(b-1,n)))
a,b,n=map(int,input().split()) def f(x): return (a*x)//b - a*(x//b) print(f(min(b-1,n)))
[]
442,556
442,557
u010090035
python
p02696
from math import floor def main(): A, B, N = map(int, input().split()) x = max(B - 1, N) print(floor(A*x/B) - A*floor(x/B)) if __name__ == "__main__": main()
from math import floor def main(): A, B, N = map(int, input().split()) x = min(B - 1, N) print(floor(A*x/B) - A*floor(x/B)) if __name__ == "__main__": main()
[ "misc.opposites", "assignment.value.change", "identifier.change", "call.function.change" ]
442,568
442,569
u411353821
python
p02696
import math A,B,N = [int(x) for x in input().split(' ')] if N/B >= 1: print(int(A-math.floor(-float(A)/float(B)))) else: print(int(math.floor(float(N)*float(A)/float(B))))
import math A,B,N = [int(x) for x in input().split(' ')] if N/B >= 1: print(int(A+math.floor(-float(A)/float(B)))) else: print(int(math.floor(float(N)*float(A)/float(B))))
[ "misc.opposites", "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
442,572
442,573
u183061347
python
p02696
import math A, B, N = map(int,input().split(' ')) def f(x): return math.floor(A*x/B)-A*math.floor(x/B) def main(): if N > B: print(f(B-1)) else: print(f(N)) if __name__ == "__main__": main()
import math A, B, N = map(int,input().split(' ')) def f(x): return math.floor(A*x/B)-A*math.floor(x/B) def main(): if N >= B: print(f(B-1)) else: print(f(N)) if __name__ == "__main__": main()
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,576
442,577
u938350027
python
p02696
import sys import itertools if sys.platform =='ios': sys.stdin=open('input_file.txt') a,b,n=map(int,input().split()) cnt=0 if n//b>0: print(a*(b-1)//b-a*((b-1)//b)) else: print(a*(n-1)//b-a*((n-1)//b))
import sys import itertools if sys.platform =='ios': sys.stdin=open('input_file.txt') a,b,n=map(int,input().split()) cnt=0 if n//b>0: print(a*(b-1)//b-a*((b-1)//b)) else: print(a*(n)//b-a*((n)//b))
[ "expression.operation.binary.remove" ]
442,594
442,595
u474925961
python
p02696
A, B, N = map(int, input().split()) x = min(B - 1, N) ans = int(a * x / b) print(ans)
A, B, N = map(int, input().split()) x = min(B - 1, N) ans = int(A * x / B) print(ans)
[ "assignment.value.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
442,601
442,602
u106095117
python
p02696
# N>=x>=0 # return max(floor(A*x/B)-A*floor(x/B)) # floor(t) は実数t以下の最大の整数 # x = Nの時が最大 # x/Bが一の直前になるようにとってみる A, B, N = [int(i) for i in input().split()] x = 0 if N > B: x = B-1 else: x = N y = (A * x)// B - A * (x//B) print(y)
# N>=x>=0 # return max(floor(A*x/B)-A*floor(x/B)) # floor(t) は実数t以下の最大の整数 # x = Nの時が最大 # x/Bが一の直前になるようにとってみる A, B, N = [int(i) for i in input().split()] x = 0 if N >= B: x = B-1 else: x = N y = (A * x)// B - A * (x//B) print(y)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,603
442,604
u967442619
python
p02696
A, B, N = [int(i) for i in input().split(' ')] if B > N: x = N else: X = B - 1 m = int(A * x / B) - A * int(x / B) print(m)
A, B, N = [int(i) for i in input().split(' ')] if B > N: x = N else: x = B - 1 m = int(A * x / B) - A * int(x / B) print(m)
[ "assignment.variable.change", "identifier.change" ]
442,605
442,606
u067986021
python
p02696
def solve(): A,B,N = map(int, input().split()) if N < B: print((A*N)//B - A * (N//B)) else: print(((A*(N-1))//B) - A* ((N-1)//B)) if __name__ == "__main__": solve()
def solve(): A,B,N = map(int, input().split()) if N < B-1: print((A*N)//B - A * (N//B)) else: print(((A*(B-1))//B) - A* ((B-1)//B)) if __name__ == "__main__": solve()
[ "control_flow.branch.if.condition.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change", "identifier.change" ]
442,613
442,614
u136843617
python
p02696
A,B,N =list(map(int,input().split())) kai = 0 if B < N: kai = int(A*(B-1)/B) else: kai = int(A*N/B) print(kai)
A,B,N =list(map(int,input().split())) kai = 0 if B <= N: kai = int(A*(B-1)/B) else: kai = int(A*N/B) print(kai)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,615
442,616
u916242112
python
p02696
import math A, B, N = [int(x) for x in input().split()] count = min(B, N) a = math.floor(float(A*count)/B) - A * math.floor(float(count)/B) print(a)
import math A, B, N = [int(x) for x in input().split()] count = min(B-1, N) a = math.floor(float(A*count)/B) - A * math.floor(float(count)/B) print(a)
[ "assignment.change" ]
442,619
442,620
u289288647
python
p02696
A, B, N = map(int, input().split()) if(N > B): x = B - 1 else: x = N ''' print(x) ''' print((A * x) // B - A * (x//B))
A, B, N = map(int, input().split()) if(N >= B): x = B - 1 else: x = N ''' print(x) ''' print((A * x) // B - A * (x//B))
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,635
442,636
u391390380
python
p02696
a, b, n = map(int, input().split()) if b >= n: x = n else: x = b - 1 print(int(a * x / b) - a * int(x / b))
a, b, n = map(int, input().split()) if b > n: x = n else: x = b - 1 print(int(a * x / b) - a * int(x / b))
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,639
442,640
u955474478
python
p02696
import math def main(): a, b, n = map(int, input().split()) x = n-1 if b-1 > n else b-1 print(math.floor(a*x/b)-a*math.floor(x/b)) if __name__ == '__main__': main()
import math def main(): a, b, n = map(int, input().split()) x = n if (b-1) > n else b-1 print(math.floor(a*x/b)-a*math.floor(x/b)) if __name__ == '__main__': main()
[ "expression.operation.binary.remove" ]
442,655
442,656
u157232135
python
p02696
A,B,N = map(int,input().split()) if N >= B: N = N - 1 ans = int(A * N / B) - A * int(N / B) print(ans)
A,B,N = map(int,input().split()) if N >= B: N = B - 1 ans = int(A * N / B) - A * int(N / B) print(ans)
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
442,657
442,658
u378349138
python
p02696
a, b, n = map(int, input().split()) if n <= b - 1: x = n else: x = b - (n%b + 1) ans = a*x//b - a*(x//b) print(ans)
a, b, n = map(int, input().split()) if n <= b - 1: x = n else: x = n - (n%b + 1) ans = a*x//b - a*(x//b) print(ans)
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
442,665
442,666
u991567869
python
p02696
a, b, n = map(int, input().split()) if n >= b: ans = a*(n - n%b - 1)//b - a*(n - n%b - 1)//b else: ans = a*n//b - a*(n//b) print(ans)
a, b, n = map(int, input().split()) if n >= b: ans = (a*(n - n%b - 1))//b - a*((n - n%b - 1)//b) else: ans = a*n//b - a*(n//b) print(ans)
[ "expression.operation.binary.remove" ]
442,667
442,668
u991567869
python
p02696
A, B, N = map(int, input().split()) print(min(B-1, N))
A, B, N = map(int, input().split()) print(A*min(B-1, N)//B)
[ "expression.operation.binary.add" ]
442,669
442,670
u594956556
python
p02696
from math import floor def f(x): return floor(A*x/B)-A*floor(x/B) A, B, N = map(int, input().split()) print(f(min(N, B-B/A)))
from math import floor def f(x): return floor(A*x/B)-A*floor(x/B) A, B, N = map(int, input().split()) print(f(min(N, B-1)))
[ "identifier.replace.remove", "literal.replace.add", "call.arguments.change", "expression.operation.binary.change", "expression.operation.binary.remove" ]
442,675
442,676
u495667483
python
p02696
A,B,N = map(int,input().split()) if B<N: print(int((A*(B-1))/B)-(A*int((B-1)/B))) else: print(int((A*N)/B)-(A*int(N/B)))
A,B,N = map(int,input().split()) if B<=N: print(int((A*(B-1))/B)-(A*int((B-1)/B))) else: print(int((A*N)/B)-(A*int(N/B)))
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,703
442,704
u811000506
python
p02696
a,b,n=map(int,input().split()) r=min(n,b) print((a*r)//b)
a,b,n=map(int,input().split()) r=min(n,b-1) print((a*r)//b)
[ "assignment.change" ]
442,713
442,714
u631299617
python
p02696
import math A,B,N = map(int,input().split()) siki = 0 k = math.floor(N/B) m = k*B if (B-1) <= N: siki = math.floor((A*(B-1))/B)-A*math.floor((B-1)/B) elif B>N: siki = math.floor((A*N)/B)-A*math.floor((N/B))
import math A,B,N = map(int,input().split()) siki = 0 k = math.floor(N/B) m = k*B if (B-1) <= N: siki = math.floor((A*(B-1))/B)-A*math.floor((B-1)/B) elif B>N: siki = math.floor((A*N)/B)-A*math.floor((N/B)) print(siki)
[ "call.add" ]
442,715
442,716
u179443195
python
p02696
import math A,B,N = map(int, input().split()) c = 0 if B > N: c = (math.floor(A * N / B))-(A * (math.floor(N / B))) elif B < N: c = (math.floor(A * (B-1) / B))-(A * (math.floor((B - 1) / B))) print(c)
import math A,B,N = map(int, input().split()) c = 0 if B > N: c = (math.floor(A * N / B))-(A * (math.floor(N / B))) elif B <= N: c = (math.floor(A * (B-1) / B))-(A * (math.floor((B - 1) / B))) print(c)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,724
442,725
u931394483
python
p02696
A, B, N = map(int, input().split()) x = max(N, B-1) ans = (A*x)//B - A*(x//B) print(ans)
A, B, N = map(int, input().split()) x = min(N, B-1) ans = (A*x)//B - A*(x//B) print(ans)
[ "misc.opposites", "assignment.value.change", "identifier.change", "call.function.change" ]
442,730
442,731
u707808519
python
p02696
A, B, N = map(int, input().split()) x = B - 1 ans = (A*x)//B-A*(x//B) print(ans)
A, B, N = map(int, input().split()) x = min(N, B-1) ans = (A*x)//B - A*(x//B) print(ans)
[ "call.add", "call.arguments.change" ]
442,732
442,731
u707808519
python
p02696
def solve(string): a, b, n = map(int, string.split()) return str(a * (b - 1) // b) if b < n else str(a * n // b) if __name__ == '__main__': import sys print(solve(sys.stdin.read().strip()))
def solve(string): a, b, n = map(int, string.split()) return str(a * (b - 1) // b) if b <= n else str(a * n // b) if __name__ == '__main__': import sys print(solve(sys.stdin.read().strip()))
[ "expression.operator.compare.change", "function.return_value.change" ]
442,735
442,736
u046187684
python
p02696
A, B, N = [ int(i) for i in input().strip().split(' ')] max_floor = 0 if B >= N: max_floor = int(A * N / B) - A * int(N/B) print(max_floor) else: floor = int(A * (B-1) / B) - A * int((B-1)/B) if max_floor < floor: max_floor = floor print(max_floor)
A, B, N = [ int(i) for i in input().strip().split(' ')] max_floor = 0 if B > N: max_floor = int(A * N / B) - A * int(N/B) print(max_floor) else: floor = int(A * (B-1) / B) - A * int((B-1)/B) if max_floor < floor: max_floor = floor print(max_floor)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,737
442,738
u362255558
python
p02696
import math a, b, n = map(int, input().split()) if n < b: x = n score = math.floor(a*x/b) - a * math.floor(x/b) print(score) else: x = b-1 score = math.floor(a*x/b) - a * math.floor(x/b) print(max_score)
import math a, b, n = map(int, input().split()) if n < b: x = n score = math.floor(a*x/b) - a * math.floor(x/b) print(score) else: x = b-1 score = math.floor(a*x/b) - a * math.floor(x/b) print(score)
[ "identifier.change", "call.arguments.change", "io.output.change" ]
442,750
442,751
u466143662
python
p02696
a,b,n = map(int,input().split()) if n<b: answer = (a*n//b)-a*(n//b) else: answer = (a*(n-1)//b) - a*((n-1)//b) print(answer)
a,b,n = map(int,input().split()) if n<b: answer = (a*n//b)-a*(n//b) else: answer = (a*(b-1)//b) - a*((b-1)//b) print(answer)
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
442,755
442,756
u288430479
python
p02696
import sys sys.setrecursionlimit(10 ** 6) # 再帰関数の再帰の深さを設定 to_index = lambda x: int(x) - 1 # 入力した数字に1を引いたものを返す print_list_in_2D = lambda x: print(*x, sep="\n") # リストの要素を改行を挟んで表示する関数 # 入力を整数に変換して受け取る def input_int(): return int(input()) def map_int_input(): return map(int, input()) MII = map_int_input def ...
import sys sys.setrecursionlimit(10 ** 6) # 再帰関数の再帰の深さを設定 to_index = lambda x: int(x) - 1 # 入力した数字に1を引いたものを返す print_list_in_2D = lambda x: print(*x, sep="\n") # リストの要素を改行を挟んで表示する関数 # 入力を整数に変換して受け取る def input_int(): return int(input()) def map_int_input(): return map(int, input()) MII = map_int_input def ...
[ "expression.operation.binary.add" ]
442,784
442,785
u199830845
python
p02696
# D - Floor Function from math import floor A, B, N = map(int, input().split()) if B < N: mx = floor(A * (B - 1) / B) - A * floor((B - 1) / B) else: mx = floor(A * N / B) - A * floor(N / B) # mx = -1 * float('inf') # i = 0 # for i in range(N + 1): # result = floor(A * i / B) - A * floor(i / B) # pr...
# D - Floor Function from math import floor A, B, N = map(int, input().split()) if B <= N: mx = floor(A * (B - 1) / B) - A * floor((B - 1) / B) else: mx = floor(A * N / B) - A * floor(N / B) # mx = -1 * float('inf') # i = 0 # for i in range(N + 1): # result = floor(A * i / B) - A * floor(i / B) # p...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,797
442,798
u537892680
python
p02696
def q4(): import math A, B, N = (int(i) for i in input().split()) x = B - 1 if N > B else N ans = math.floor(x*A//B) - A * math.floor(x//B) return ans if __name__ == '__main__': ans = q4() print(ans)
def q4(): import math A, B, N = (int(i) for i in input().split()) x = B - 1 if N >= B else N ans = math.floor(x*A//B) - A * math.floor(x//B) return ans if __name__ == '__main__': ans = q4() print(ans)
[ "expression.operator.compare.change", "assignment.value.change" ]
442,804
442,805
u894074703
python
p02696
import math a, b, n = map(int, input().split()) def f(x): return math.floor(a * x / b) - a * math.floor(x // b) print(f(min(b, n)))
import math a, b, n = map(int, input().split()) def f(x): return math.floor(a * x / b) - a * math.floor(x // b) print(f(min(b - 1, n)))
[ "expression.operation.binary.add" ]
442,806
442,807
u145231176
python
p02696
def f(x): return (A*x)//B-A*(x//B) A, B, N = map(int, input().split()) a = min(N, B) print(f(a))
def f(x): return (A*x)//B-A*(x//B) A, B, N = map(int, input().split()) a = min(N, B-1) print(f(a))
[ "assignment.change" ]
442,812
442,813
u047796752
python
p02696
from sys import stdin A,B,N=list(map(int, (stdin.readline().strip().split()))) if B-1<N:C=N else:C=N a=(A*C)//B b=A*(C//B) print(a-b)
from sys import stdin A,B,N=list(map(int, (stdin.readline().strip().split()))) if B-1<=N:C=B-1 else:C=N a=(A*C)//B b=A*(C//B) print(a-b)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "assignment.value.change" ]
442,823
442,824
u459419927
python
p02696
a,b,c=map(int,input().split()) if c+1>=b: ans=int(a*(b-1)/b) else: ans=(a*c/b) print(ans)
a,b,c=map(int,input().split()) if c+1>=b: ans=int(a*(b-1)/b) else: ans=int(a*c/b) print(ans)
[ "call.add", "type_conversion.to_integer.change", "type_conversion.to_number.change" ]
442,833
442,834
u941022948
python
p02696
import sys import math a, b, n = map(int, input().split()) if (n < b): print(math.floor(a * n / b)) sys.exit() else: print(math.floor(a*(b+1)/b)-a*math.floor((b+1)/b))
import sys import math a, b, n = map(int, input().split()) if (n < b): print(math.floor(a * n / b)) sys.exit() else: print(math.floor(a*(2*b-1)/b)-a*math.floor((2*b-1)/b))
[ "misc.opposites", "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
442,835
442,836
u469281291
python
p02696
A, B, N = [int(v) for v in input().strip().spilt(" ")] if N < B: print(int(A * N * B) - A * int(N / B)) else: print(int(A * (B - 1) * B) - A * int((B - 1) / B))
A, B, N = [eval(v) for v in input().strip().split(" ")] if N < B: print(int(A * N / B) - A * int(N / B)) else: print(int(A * (B - 1) / B) - A * int((B - 1) / B))
[ "assignment.value.change", "identifier.change", "call.function.change", "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
442,839
442,840
u551058317
python
p02696
A, B, N = [int(x) for x in input().split()] def func(A, B, x): return int(A * x/ B) - A * int(x/B) if B < N: print(func(A, B, B - 1)) else: print(func(A, B, N))
A, B, N = [int(x) for x in input().split()] def func(A, B, x): return int(A * x / B) - A * int(x/B) if B <= N: print(func(A, B, B - 1)) else: print(func(A, B, N))
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,853
442,854
u608579392
python
p02696
a, b, n = map(int, input().split()) c = max(b-1, n) parint(int(a*c/b))
a, b, n = map(int, input().split()) c = min(b-1, n) print(int(a*c/b))
[ "misc.opposites", "assignment.value.change", "identifier.change", "call.function.change" ]
442,855
442,856
u384124931
python
p02696
A, B, N = map(int, input().split()) def floor(x): out = (A * x)//B - A * (x//B) return out max = 0 #for i in range(N//2, N + 1): #if(floor(i) > max): #max = floor(i) if(floor(N) >= floor(B-1)): max = floor(N) else: max = floor(B-1) print(max)
A, B, N = map(int, input().split()) def floor(x): out = (A * x)//B - A * (x//B) return out max = 0 #for i in range(N//2, N + 1): #if(floor(i) > max): #max = floor(i) if(N < (B-1)): max = floor(N) else: max = floor(B-1) print(max)
[ "call.remove", "control_flow.branch.if.condition.change" ]
442,864
442,865
u110199424
python
p02696
#ABC165d import math a, b, n = map(int,input().split()) x = min(b-1,n) print(x) print(math.floor(a*x/b))
#ABC165d import math a, b, n = map(int,input().split()) x = min(b-1,n) print(math.floor(a*x/b))
[ "call.remove" ]
442,870
442,871
u185297444
python
p02696
import math a,b,n = map(int, input().split()) x = min(b,n) print(math.floor(a*x/b))
import math a,b,n = map(int, input().split()) x = min(b-1,n) print(math.floor(a*x/b))
[ "assignment.change" ]
442,872
442,873
u712322283
python
p02696
A, B, N = list(map(int, input().split())) if B==1: print(0) tb = B - 1 tp_pre = 0 while(True): tp = (A*tb)//B - A*(tb//B) if tp > tp_pre: tp_pre = tp tb += B if tb > N: break if (B > N): print((A*N)//B - A*(N//B)) else: print(int(tp_pre))
A, B, N = list(map(int, input().split())) if B==1: print(0) else: tb = B - 1 tp_pre = 0 while(True): tp = (A*tb)//B - A*(tb//B) if tp > tp_pre: tp_pre = tp tb += B if tb > N: break if (B > N): print((A*N)//B - A*(N//B)) else: print(int(tp_pre))
[]
442,892
442,893
u714732628
python
p02696
A, B, N = list(map(int, input().split())) if B==1: print(0) tb = B - 1 tp_pre = 0 while(True): tp = (A*tb)//B - A*(tb//B) if tp > tp_pre: tp_pre = tp tb += B if tb > N: break if (B > N): print((A*N)//B - A*(N//B)) else: print(int(tmp_pre))
A, B, N = list(map(int, input().split())) if B==1: print(0) else: tb = B - 1 tp_pre = 0 while(True): tp = (A*tb)//B - A*(tb//B) if tp > tp_pre: tp_pre = tp tb += B if tb > N: break if (B > N): print((A*N)//B - A*(N//B)) else: print(int(tp_pre))
[ "identifier.change", "call.arguments.change", "io.output.change" ]
442,894
442,893
u714732628
python
p02696
a, b, n = map(int, input().split()) def f(x): return (a * x) // b - a * (x // b) if n < b: print(f(n)) else: print(f(b))
a, b, n = map(int, input().split()) def f(x): return (a * x) // b - a * (x // b) if n < b: print(f(n)) else: print(f(b - 1))
[ "expression.operation.binary.add" ]
442,902
442,903
u997641430
python
p02696
a, b, n = map(int, input().split()) print(a * (b-1) // b)
a, b, n = map(int, input().split()) print(a * min((b-1), n) // b)
[ "call.add", "call.arguments.add" ]
442,909
442,910
u702582248
python
p02696
func = [] A , B , N = map(int , input().split()) """ for x in range(N+1): func.append((A*x) // B - A * (x // B )) print(max(func)) """ if B - 1 > N + 1: print((A*(N)) // B - A * ((N) // B )) else: print((A*(B-1)) // B - A * ((B-1) // B ))
func = [] A , B , N = map(int , input().split()) """ for x in range(N+1): func.append((A*x) // B - A * (x // B )) print(max(func)) """ if B - 1 > N: print((A*(N)) // B - A * ((N) // B )) else: print((A*(B-1)) // B - A * ((B-1) // B ))
[ "expression.operation.binary.remove" ]
442,912
442,913
u079656139
python
p02696
import math a, b, n = map(int, input().split()) y = b-1 x = 0 if x < n: x = y else: x = n print(math.floor(a*x/b))
import math a, b, n = map(int, input().split()) y = b-1 x = 0 if y < n: x = y else: x = n print(math.floor(a*x/b))
[ "identifier.change", "control_flow.branch.if.condition.change" ]
442,934
442,935
u169696482
python
p02696
import math a, b, n = map(int, input().split()) y = b-1 if x < n: x = y else: x = n print(math.floor(a*x/b))
import math a, b, n = map(int, input().split()) y = b-1 x = 0 if y < n: x = y else: x = n print(math.floor(a*x/b))
[ "control_flow.branch.if.add" ]
442,936
442,935
u169696482
python
p02696
from sys import setrecursionlimit, exit setrecursionlimit(1000000000) def main(): a, b, n = map(int, input().split()) print(a * min(n, b - 1) // b - a * (max(n, b - 1) // b)) main()
from sys import setrecursionlimit, exit setrecursionlimit(1000000000) def main(): a, b, n = map(int, input().split()) print(a * min(n, b - 1) // b - a * (min(n, b - 1) // b)) main()
[ "misc.opposites", "identifier.change", "call.function.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
442,956
442,957
u929569377
python
p02696
#!/usr/bin/env python3 import sys def solve(A: int, B: int, N: int): if B >= N: x = N else: x = B - 1 print(A * x // B) return # Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom...
#!/usr/bin/env python3 import sys def solve(A: int, B: int, N: int): if B > N: x = N else: x = B - 1 print(A * x // B) return # Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom ...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
442,979
442,980
u884087839
python
p02696
N = [int(e) for e in input().split()] t = N[1] - 1 if(t > N[2]): t = N[2] ans = (N[0]*N[2])//N[1] - N[0]*(t//N[1]) print(ans)
N = [int(e) for e in input().split()] t = N[1] - 1 if(t > N[2]): t = N[2] ans = (N[0]*t)//N[1] - N[0]*(t//N[1]) print(ans)
[ "assignment.value.change", "expression.operation.binary.change" ]
442,986
442,987
u282978698
python
p02696
a, b, n = map(int, input().split()) def floor(x): return int(a * x / b) - a * int(x / b) if n >= b-1: ans = floor(b-1) else: ans = floor(n-1) print(ans)
a, b, n = map(int, input().split()) def floor(x): return int(a * x / b) - a * int(x / b) if n >= b-1: ans = floor(b-1) else: ans = floor(n) print(ans)
[ "expression.operation.binary.remove" ]
443,021
443,022
u067077296
python
p02696
a, b, n = map(int,input().split()) if n-1 >= b: x = n-1 else: x = n print(a*x//b - a*(x//b))
a, b, n = map(int,input().split()) if n >= b-1: x = b-1 else: x = n print(a*x//b - a*(x//b))
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change", "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
443,029
443,030
u680851063
python
p02696
#!/usr/bin/python3 import math #標準出力からの読み込み input_1 = input() a = int(input_1.split(" ")[0]) b = int(input_1.split(" ")[1]) n = int(input_1.split(" ")[2]) #判定ロジック score = math.floor(a/b*math.min(b-1, n)) print(score)
#!/usr/bin/python3 import math #標準出力からの読み込み input_1 = input() a = int(input_1.split(" ")[0]) b = int(input_1.split(" ")[1]) n = int(input_1.split(" ")[2]) #判定ロジック score = math.floor(a/b*min(b-1, n)) print(score)
[]
443,038
443,039
u590212853
python
p02696
A,B,N = map(int,input().split()) x = min(B-1,N) print((A*x)//b - A*(x//b))
A,B,N = map(int,input().split()) x = min(B-1,N) print((A*x)//B-A*(x//B))
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
443,045
443,046
u761638117
python
p02696
A,B,N = map(int,input().split()) x = min(B-1,N) print((A*x)//b-A*(x//b))
A,B,N = map(int,input().split()) x = min(B-1,N) print((A*x)//B-A*(x//B))
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
443,047
443,046
u761638117
python
p02696
import math A,B,N=map(int,input().split()) if N >= B: N = N-1 ans = math.floor((A*N/B)) - A*math.floor(N/B) print(ans)
import math A,B,N=map(int,input().split()) if N >= B: N = B-1 ans = math.floor(A*N/B) - A*math.floor(N/B) print(ans)
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change", "call.arguments.change" ]
443,090
443,091
u940780117
python
p02696
import math A,B,N=map(float,input().split()) if N >= B: N = N-1 ans = math.floor((A*N/B)) - A*math.floor(N/B) print(int(ans))
import math A,B,N=map(float,input().split()) if N >= B: N = B-1 ans = math.floor(A*N/B) - A*math.floor(N/B) print(int(ans))
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change", "call.arguments.change" ]
443,092
443,093
u940780117
python
p02696
import math A,B,N=map(float,input().split()) if N == B: N = N-1 ans = math.floor((A*N/B)) - A*math.floor(N/B) print(int(ans))
import math A,B,N=map(float,input().split()) if N >= B: N = B-1 ans = math.floor(A*N/B) - A*math.floor(N/B) print(int(ans))
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "assignment.value.change", "identifier.change", "expression.operation.binary.change", "call.arguments.change" ]
443,094
443,093
u940780117
python
p02696
arr = input().split(" ") a, b, n = int(arr[0]), int(arr[1]), int(arr[2]) if b<=n: k = int((a*(b-1))/b) else: k = int((a*n)/b)
arr = input().split(" ") a, b, n = int(arr[0]), int(arr[1]), int(arr[2]) if b<=n: k = int((a*(b-1))/b) else: k = int((a*n)/b) print(k)
[ "call.add" ]
443,100
443,101
u373190391
python
p02696
def resolve(): A, B, N = map(int, input().split()) print(A * min(N, B) // B) resolve()
def resolve(): A, B, N = map(int, input().split()) print(A * min(N, B - 1) // B) resolve()
[ "expression.operation.binary.add" ]
443,106
443,107
u586662847
python
p02696
import math A, B, N = map(int, input().split()) if N > B: N = B ans = math.floor(A * N / B) print(ans)
import math A, B, N = map(int, input().split()) if N >= B: N = B - 1 ans = math.floor(A * N / B) print(ans)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
443,119
443,120
u937706062
python
p02696
import math A, B, N = list(map(int, input().split())) minx = min([B-1, N]) print(math.floor(A*minx/B) - A*math.floor(minx*B))
import math A, B, N = list(map(int, input().split())) minx = min([B-1, N]) print(math.floor(A*minx/B) - A*math.floor(minx/B))
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
443,130
443,131
u616468898
python
p02696
import math A,B,N=map(int,input().split()) print(math.floor(A/B*(~-B if N>B else N)))
import math A,B,N=map(int,input().split()) print(math.floor(A/B*(~-B if N>=B else N)))
[ "expression.operator.compare.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
443,140
443,141
u692746605
python
p02696
a, b, n = [int(x) for x in input().split()] x = min(b - 1, n) answer = floor(a * x / b) - a * floor(x / b) print(answer)
from math import floor a, b, n = [int(x) for x in input().split()] x = min(b - 1, n) answer = floor(a * x / b) - a * floor(x / b) print(answer)
[]
443,144
443,145
u674190122
python
p02696
a, b, n = map(int, input().split()) def calc(x): return int(a*x/b)-a*int(x/b) print(calc(min(b,n)))
a, b, n = map(int, input().split()) def calc(x): return int(a*x/b)-a*int(x/b) print(calc(min(b-1,n)))
[ "expression.operation.binary.add" ]
443,146
443,147
u318127926
python
p02696
import math A, B, N = map(int, input().split()) x = min(N-1, B) print(math.floor(A*x/B) - A*math.floor(x/B))
import math A, B, N = map(int, input().split()) x = min(N, B-1) print(math.floor(A*x/B) - A*math.floor(x/B))
[ "expression.operation.binary.remove" ]
443,167
443,168
u207097826
python
p02696
a,b,n = map(int, input().split(" ")) def floor(x): return ((a*x/b)//1) - a*((x/b)//1) ans = floor(max(b-1,n)) print(int(ans))
a,b,n = map(int, input().split(" ")) def floor(x): return ((a*x/b)//1) - a*((x/b)//1) ans = floor(min(b-1,n)) print(int(ans))
[ "misc.opposites", "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.change" ]
443,172
443,173
u747391638
python
p02696
a,b,n = map(int, input().split()) def f(x): return (a*(x%b)-(a*b)%b)//b ans = f(min(n,b-1))
a,b,n = map(int, input().split()) def f(x): return (a*(x%b)-(a*b)%b)//b ans = f(min(n,b-1)) print(ans)
[ "call.add" ]
443,180
443,181
u545368057
python
p02696
import math A,B,N= map(int,input().split()) if B<N: lista=(math.floor((A*(B-1))/B)-A*(math.floor((B-1)/B))) print(lista) else: list=(math.floor((A*N)/B)-A*(math.floor(N/B))) print(list)
import math A,B,N= map(int,input().split()) if B<=N: lista=(math.floor((A*(B-1))/B)-A*(math.floor((B-1)/B))) print(lista) else: list=(math.floor((A*N)/B)-A*(math.floor(N/B))) print(list)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
443,192
443,193
u270886147
python
p02696
#D A,B,N=map(int,input().split()) if N>=B: ans=A-int(A/B) else: ans=int(A*N/B) print(ans)
#D A,B,N=map(int,input().split()) if N>=B: ans=int(A-A/B) else: ans=int(A*N/B) print(ans)
[ "expression.operation.binary.remove" ]
443,194
443,195
u330728443
python
p02696
import math a,b,n=map(int, input().split()) m = 0 c = 0 if n<b: m = math.floor(a*n/b) else: c = math.floor(a*(b-1)/b)-a*math.floor((b-1)/b) print(m)
import math a,b,n=map(int, input().split()) m = 0 if n<b: m = math.floor(a*n/b) else: m = math.floor(a*(b-1)/b)-a*math.floor((b-1)/b) print(m)
[ "assignment.variable.change", "identifier.change" ]
443,203
443,204
u816637025
python
p02696
A,B,N=map(int,input().split()) x=B-1 def f(t): return int(t//1) if N>B: M=f(A*x/B)-A*f(x/B) print (M) else: N=f(A*N/B)-A*f(N/B) print (N)
A,B,N=map(int,input().split()) x=B-1 def f(t): return int(t//1) if N>=B: M=f(A*x/B)-A*f(x/B) print (M) else: N=f(A*N/B)-A*f(N/B) print (N)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
443,205
443,206
u213299590
python
p02696
import math A,B,N = map(int, input().split()) def calc(x): y = math.floor(A * x / B) - A * math.floor(x / B) return y max_v = 0 if N < B: max_v = calc(N) else: max_v = calc(B) # for x in range(N+1): # print(x,max_v) # x=Bでさちる # max_v = max(max_v, calc(x)) print(max_v)
import math A,B,N = map(int, input().split()) def calc(x): y = math.floor(A * x / B) - A * math.floor(x / B) return y max_v = 0 if N < B: max_v = calc(N) else: max_v = calc(B-1) # for x in range(N+1): # print(x,max_v) # x=Bでさちる # max_v = max(max_v, calc(x)) print(max_v)
[ "assignment.change" ]
443,218
443,219
u789714448
python
p02696
import math a, b, n = map(int, input().split()) x = 0 ans = 0 if n < b: x = n ans = math.floor(a*x/b) - a * math.floor(x/b) else: x = n - 1 ans = math.floor(a*x/b) - a * math.floor(x/b) print(ans)
import math a, b, n = map(int, input().split()) x = 0 ans = 0 if n < b: x = n ans = math.floor(a*x/b) - a * math.floor(x/b) else: x = b - 1 ans = math.floor(a*x/b) - a * math.floor(x/b) print(ans)
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
443,220
443,221
u851706118
python
p02696
a, b, n = map(int, input().split()) x = 0 ans = 0 if n < b: x = n ans = math.floor(a*x/b) - a * math.floor(x/b) else: x = n - 1 ans = math.floor(a*x/b) - a * math.floor(x/b) print(ans)
import math a, b, n = map(int, input().split()) x = 0 ans = 0 if n < b: x = n ans = math.floor(a*x/b) - a * math.floor(x/b) else: x = b - 1 ans = math.floor(a*x/b) - a * math.floor(x/b) print(ans)
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
443,222
443,221
u851706118
python
p02696
import numpy as np import pprint import math a, b, n = map(int, input().split()) s = min(n, b) ans = math.floor(a * s / b) - a * math.floor(s / b) print(ans)
import numpy as np import pprint import math a, b, n = map(int, input().split()) s = min(n, b - 1) ans = math.floor(a * s / b) - a * math.floor(s / b) print(ans)
[ "assignment.change" ]
443,228
443,229
u233107306
python