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 |
|---|---|---|---|---|---|---|---|
p02754 | # -*= coding: utf-8 -*-
N, A, B = map(int, input().split())
if A == 0:
print(0)
exit()
x = N // (A+B)
x = x * A
y = N % (A+B)
if y >= 3:
y = A
print(x + y) | # -*= coding: utf-8 -*-
N, A, B = map(int, input().split())
if A == 0:
print(0)
exit()
x = N // (A+B)
x = x * A
y = N % (A+B)
if y >= A:
y = A
print(x + y) | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change"
] | 531,961 | 531,962 | u531391334 | python |
p02754 | n, a, b = map(int, input().split())
ret = 0
ret += a*n//(a+b)
rem = n%(a+b)
ret += min(rem, a)
print(ret) | n, a, b = map(int, input().split())
ret = 0
ret += a*(n//(a+b))
rem = n%(a+b)
ret += min(rem, a)
print(ret) | [] | 531,978 | 531,979 | u729627789 | python |
p02754 | a,b,c=map(int,input().split())
n = a // (b+c)
m = a - (b+c)*n
res = n*b
if b < m:
res += m
else:
res += b
print(res) | a,b,c=map(int,input().split())
n = a // (b+c)
m = a - (b+c)*n
res = n*b
if m < b:
res += m
else:
res += b
print(res) | [
"control_flow.branch.if.condition.change"
] | 531,980 | 531,981 | u113255362 | python |
p02754 | n,b,r=map(int,input().split());print((n//(b+r))*b+n%(b+r)) | n,b,r=map(int,input().split());print((n//(b+r))*b+min(b,n%(b+r))) | [
"call.add",
"call.arguments.change"
] | 531,982 | 531,983 | u014333473 | python |
p02754 | n,a,b=map(int,input().split())
i=n%(a+b)
print(i)
if i>a:
print(a*(n//(a+b))+a)
else:
print(a*(n//(a+b))+i) | n,a,b=map(int,input().split())
i=n%(a+b)
if i>a:
print(a*(n//(a+b))+a)
else:
print(a*(n//(a+b))+i) | [
"call.remove"
] | 531,988 | 531,989 | u516579758 | python |
p02754 | n,a,b=map(int,input().split())
i=n%(a+b)
if i>a:
print(a*n//(a+b)+a)
else:
print(a*n//(a+b)+i) | n,a,b=map(int,input().split())
i=n%(a+b)
if i>a:
print(a*(n//(a+b))+a)
else:
print(a*(n//(a+b))+i) | [
"call.arguments.change"
] | 531,990 | 531,989 | u516579758 | python |
p02754 | n,a,b = map(int,input().split())
c = n // (a + b)
d = n % (a + b)
if d - a < 0:
print((c * a) + d)
else:
print((c * a) + (d - a)) | n,a,b = map(int,input().split())
c = n // (a + b)
d = n % (a + b)
if d - a < 0:
print((c * a) + d)
else:
print((c * a) + a) | [
"call.arguments.change"
] | 531,999 | 532,000 | u557953657 | python |
p02754 | N,A,B=map(int,input().split())
t=N//(A+B)
s=N%(A+B)
ans = t*A + s
print(ans) | N,A,B=map(int,input().split())
t=N//(A+B)
s=N%(A+B)
ans = t*A + min(s,A)
print(ans) | [
"call.add",
"call.arguments.add"
] | 532,017 | 532,018 | u519339498 | python |
p02754 | n,a,b=map(int,input().split())
x=n//(a+b)
y=n-(a+b)*x
ans=a*x
if y>=(a+b):
ans+=a
else:
ans+=y
print(ans) | n,a,b=map(int,input().split())
x=n//(a+b)
y=n-(a+b)*x
ans=a*x
if y>=a:
ans+=a
else:
ans+=y
print(ans) | [
"control_flow.branch.if.condition.change"
] | 532,023 | 532,024 | u414920281 | python |
p02754 | N,A,B = map(int,input().split())
#n blue red
#8 3 4
#bbbrrrrb
#4
ans = 0
x = N // (A+B)
ans += (x * A)
N -= x * (A+B)
if N <= A:
ans += N
else:
ans += A
| N,A,B = map(int,input().split())
#n blue red
#8 3 4
#bbbrrrrb
#4
ans = 0
x = N // (A+B)
ans += (x * A)
N -= x * (A+B)
if N <= A:
ans += N
else:
ans += A
print(ans) | [
"call.add"
] | 532,025 | 532,026 | u967484343 | python |
p02754 | N,A,B = map(int, input().split())
S = A+B
x = N//S
y = N%S
print(x*A+y) | N,A,B = map(int, input().split())
S = A+B
x = N//S
y = N%S
print(x*A+min(y,A)) | [
"call.add",
"call.arguments.add",
"call.arguments.change"
] | 532,045 | 532,046 | u698902360 | python |
p02754 | N,A,B = list(map(int,input().split()))
print(A*(N//(A+B))+N%(A+B)) | N,A,B = list(map(int,input().split()))
print(A*(N//(A+B))+min(A,N%(A+B))) | [
"call.add",
"call.arguments.change"
] | 532,047 | 532,048 | u759412327 | python |
p02754 | n, a, b = map(int,input().split())
if a != 0:
answer = n // (a+b)
remainder = n % (a+b)
print(answer*a) + min(a, remainder)
else:
print(0) | n, a, b = map(int,input().split())
if a != 0:
answer = n // (a+b)
remainder = n % (a+b)
print((answer*a) + min(a, remainder))
else:
print(0) | [
"call.arguments.change"
] | 532,058 | 532,059 | u853728588 | python |
p02754 | N, A, B = map(int, input().split())
total = N//(A + B)*B + max(0, N%(A+B)-A)
print(total) | N, A, B = map(int, input().split())
total = N//(A + B)*A + min(A, N%(A+B))
print(total) | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change",
"misc.opposites",
"call.function.change",
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change",
"expression.operation.binary.remove"
] | 532,077 | 532,078 | u439063038 | python |
p02754 | N, A, B = map(int, input().split())
tmp = 0
tmp = N // (A + B) * A
print(tmp + min(N - (A + B), A))
| N, A, B = map(int, input().split())
tmp = 0
tmp = N // (A + B) * A
print(tmp + min(N % (A + B), A))
| [
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 532,088 | 532,089 | u855665975 | python |
p02754 | #
import sys
input=sys.stdin.readline
def main():
N,A,B=map(int,input().split())
if N%(A+B)<=A:
print(A*N//(A+B)+N%(A+B))
else:
print(A*N//(A+B)+A)
if __name__=="__main__":
main()
| #
import sys
input=sys.stdin.readline
def main():
N,A,B=map(int,input().split())
if N%(A+B)<=A:
print(A*(N//(A+B))+N%(A+B))
else:
print(A*(N//(A+B))+A)
if __name__=="__main__":
main()
| [
"call.arguments.change"
] | 532,107 | 532,108 | u847923740 | python |
p02754 | n, a, b = map(int, input().split())
q = n // (a + b)
r = n % (a + b)
print(q*a + r) | n, a, b = map(int, input().split())
q = n // (a + b)
r = n % (a + b)
print(q*a + min(r, a)) | [
"call.add",
"call.arguments.add",
"call.arguments.change"
] | 532,124 | 532,125 | u941644149 | python |
p02754 | n, a, b = map(int,input().split())
p = n // (a+b)
ans = a*b + min(a,(n%(a + b)))
print(ans) | n, a, b = map(int,input().split())
p = n // (a+b)
ans = a*p + min(a,(n%(a + b)))
print(ans)
| [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 532,131 | 532,132 | u228303592 | python |
p02754 | n,a,b = map(int,input().split())
c = n//(a+b)
if n%(a+b) >= b:
print((c*a)+a)
else:
print((c*a)+n%(a+b)) | n,a,b = map(int,input().split())
c = n//(a+b)
if n%(a+b) >= a:
print((c*a)+a)
else:
print((c*a)+n%(a+b)) | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 532,133 | 532,134 | u175590965 | python |
p02754 | n,a,b = map(int,input().split())
x=n//(a+b)
y=n - C1*(a+b)
if y >= a:
y=a
print(a*x+y) | n,a,b = map(int,input().split())
x=n//(a+b)
y=n - x*(a+b)
if y >= a:
y=a
print(a*x+y) | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 532,145 | 532,146 | u617556913 | python |
p02754 | def main():
n, a, b = map(int, input().split())
q, mod = divmod(n, (a+b))
x = mod if mod < n else a
print(q*a+x)
if __name__ == "__main__":
main()
| def main():
n, a, b = map(int, input().split())
q, mod = divmod(n, (a+b))
x = mod if mod < a else a
print(q*a+x)
if __name__ == "__main__":
main() | [
"assignment.value.change",
"identifier.change"
] | 532,165 | 532,166 | u173644182 | python |
p02754 | def main():
n, a, b = map(int, input().split())
q, mod = divmod(n, (a+b))
x = mod if mod < n else n
print(q*a+x)
if __name__ == "__main__":
main()
| def main():
n, a, b = map(int, input().split())
q, mod = divmod(n, (a+b))
x = mod if mod < a else a
print(q*a+x)
if __name__ == "__main__":
main() | [
"assignment.value.change",
"identifier.change"
] | 532,168 | 532,166 | u173644182 | python |
p02754 | n,a,b=map(int,input().split())
#x=n//(a+b)
#y=n%(a+b)
if n%(a+b) < a: print(a*n//(a+b)+n%(a+b))
else: print(a*(n//(a+b)+1))
| n,a,b=map(int,input().split())
#x=n//(a+b)
#y=n%(a+b)
if n%(a+b) < a: print(a*(n//(a+b))+(n%(a+b)))
else: print(a*((n//(a+b)+1)))
| [
"call.arguments.change"
] | 532,169 | 532,170 | u666964944 | python |
p02754 | n,a,b = map(int, input().split())
x = n//(a+b)
y = n%(a+b)
print(x*a + max(y,y-b)) | n,a,b = map(int, input().split())
x = n//(a+b)
y = n%(a+b)
print(x*a + min(y,a)) | [
"misc.opposites",
"identifier.change",
"call.function.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change",
"expression.operation.binary.remove"
] | 532,183 | 532,184 | u188827677 | python |
p02754 | n,a,b = map(int, input().split())
t = n //(a+b)
s = min(n-(a+b), a)
print(t*a+s) | n,a,b = map(int, input().split())
t = n //(a+b)
s = min(n-(a+b)*t, a)
print(t*a+s) | [
"assignment.change"
] | 532,186 | 532,187 | u188827677 | python |
p02754 | N,A,B=map(int,input().split())
a=(N//(A+B))
b=N%(A+B)
print(a*A+b)
| N,A,B=map(int,input().split())
a=(N//(A+B))
b=min(A,N%(A+B))
print(a*A+b)
| [
"call.add",
"call.arguments.change"
] | 532,213 | 532,214 | u750822433 | python |
p02754 | n,a,b = map(int, input().split())
hoge = n // (a+b)
hoge1 = n % (a+b)
if hoge1 <= 4:
print(hoge*a + hoge1)
else:
print(hoge*a + 4) | n,a,b = map(int, input().split())
hoge = n // (a+b)
hoge1 = n % (a+b)
if hoge1 <= a:
print(hoge*a + hoge1)
else:
print(hoge*a + a) | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 532,241 | 532,242 | u920694585 | python |
p02754 | n,a,b=map(int,input().split())
if n//(a+b)<=a:
print((n//(a+b))*a+ n % (a+b))
else:
print((n//(a+b))*a+ a)
| n,a,b=map(int,input().split())
if n%(a+b)<=a:
print((n//(a+b))*a+ n % (a+b))
else:
print((n//(a+b))*a+ a)
| [
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change"
] | 532,258 | 532,259 | u519968172 | python |
p02754 | N,A,B=map(int,input().split())
ans=0
times=N//(A+B)
rest=N%(A+B)
ans=times*A
if rest>A:
a=A
else:
a=rest
print(ans+rest) | N,A,B=map(int,input().split())
ans=0
times=N//(A+B)
rest=N%(A+B)
ans=times*A
if rest>A:
a=A
else:
a=rest
print(ans+a) | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 532,260 | 532,261 | u659712937 | python |
p02754 | n,a,b = map(int,input().split())
c = n // (a+b)
ans = a * c
d = n % (a+b)
if 0 < d <= a:
print(ans+d)
else:
print(ans+a) | n,a,b = map(int,input().split())
c = n // (a+b)
ans = a * c
d = n % (a+b)
if 0 <= d <= a:
print(ans+d)
else:
print(ans+a) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 532,278 | 532,279 | u953110527 | python |
p02754 | n, a, b = map(int, input().split())
b_count = n // (a+b)
if (n-(a+b)*b_count) <= a:
print(n-b*b_count)
else:
print(n-b*b_count + a) | n, a, b = map(int, input().split())
b_count = n // (a+b)
if (n-(a+b)*b_count) <= a:
print(n-b*b_count)
else:
print(a*b_count + a) | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change",
"expression.operation.binary.remove"
] | 532,300 | 532,301 | u871867619 | python |
p02754 | n,a,b=map(int,input().split())
p,q=divmod(n,(a+b))
print(p*b + [b,q][q<b]) | n,a,b=map(int,input().split())
p,q=divmod(n,(a+b))
print(p*a + [a,q][q<a]) | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change",
"variable_access.subscript.index.change"
] | 532,314 | 532,315 | u094999522 | python |
p02754 | def solve():
N,A,B = map(int, input().split())
x,y = divmod(N, A+B)
if y>B:
y = A
print(A*x + y)
if __name__ == '__main__':
solve() | def solve():
N,A,B = map(int, input().split())
x,y = divmod(N, A+B)
if y>A:
y = A
print(A*x + y)
if __name__ == '__main__':
solve() | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 532,327 | 532,328 | u136843617 | python |
p02754 | n,a,b=map(int,input().split())
ans=n//(a+n)*a
rem=n%(a+b)
ans+=min(rem,a)
print(ans) | n,a,b=map(int,input().split())
ans=n//(a+b)*a
rem=n%(a+b)
ans+=min(rem,a)
print(ans) | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 532,331 | 532,332 | u566574814 | python |
p02754 | n, a, b = map(int, input().split())
x = n // (a + b) * a
k = n % (a + b)
if k <= a:
print(n + k)
else:
print(n + a) | n, a, b = map(int, input().split())
x = n // (a + b) * a
k = n % (a + b)
if k <= a:
print(x + k)
else:
print(x + a)
| [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 532,337 | 532,338 | u581403769 | python |
p02754 | N, A, B = map(int,input().split())
t = N%(A+B)
if t > A:
print(N//(A+B)*A)
else:
print(N//(A+B)*A+t) | N, A, B = map(int,input().split())
t = N%(A+B)
if t > A:
print((N//(A+B)+1)*A)
else:
print(N//(A+B)*A+t) | [
"call.arguments.change"
] | 532,348 | 532,349 | u834224054 | python |
p02754 | N,A,B = list(map(int, input().split()))
print(N//(A+B)*A + min(N%(A+B), B)) | N,A,B = list(map(int, input().split()))
print(N//(A+B)*A + min(N%(A+B), A)) | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 532,363 | 532,364 | u620617652 | python |
p02754 | def main():
N, A, B = map(int, input().split())
AB = A + B
q, r = divmod(N, AB)
print(A * q + r)
if __name__ == '__main__':
main()
| def main():
N, A, B = map(int, input().split())
AB = A + B
q, r = divmod(N, AB)
print(A * q + min(r, A))
if __name__ == '__main__':
main()
| [
"call.add",
"call.arguments.add"
] | 532,369 | 532,370 | u562935282 | python |
p02754 | n,a,b=map(int,input().split())
print((n//(a+b))*a+(n%(a+b))) | n,a,b=map(int,input().split())
print((n//(a+b))*a+min((n%(a+b)),a)) | [
"call.add",
"call.arguments.add",
"call.arguments.change"
] | 532,375 | 532,376 | u858929490 | python |
p02754 | N, A, B = map(int, input().split())
print(min((N//(A+B))*A + N-(N//(A+B)), (N//(A+B))*A + A)) | N, A, B = map(int, input().split())
print(min((N//(A+B))*A + N - (N//(A+B))*(A+B), (N//(A+B))*A + A)) | [
"expression.operation.binary.add"
] | 532,377 | 532,378 | u600261652 | python |
p02754 | Nf,Af,Bf = (input().split(' '))
N = int(Nf)
A = int(Af)
B = int(Bf)
a = N % (A + B)
b = N // (A + B)
if a < A + 1:
print(A*b+a)
else:
print(A*b) | Nf,Af,Bf = (input().split(' '))
N = int(Nf)
A = int(Af)
B = int(Bf)
a = N % (A + B)
b = N // (A + B)
if a < A + 1:
print(A*b+a)
else:
print(A*b+A) | [
"expression.operation.binary.add"
] | 532,379 | 532,380 | u514118270 | python |
p02754 | #!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
#%%code
def resolve():
N,A,B=pin()
C=A+B
n=N%C
m=N//C
ans=A*m
if n<=B:
ans+=n
else:
... | #!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
#%%code
def resolve():
N,A,B=pin()
C=A+B
n=N%C
m=N//C
ans=A*m
if n<=A:
ans+=n
else:
... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 532,402 | 532,403 | u857428111 | python |
p02754 | # coding: utf-8
# Your code here!
# coding: utf-8
from math import gcd
from functools import reduce
import sys
sys.setrecursionlimit(200000000)
from inspect import currentframe
# my functions here!
#標準エラー出力
def printargs2err(*args):
names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}
print(',... | # coding: utf-8
# Your code here!
# coding: utf-8
from math import gcd
from functools import reduce
import sys
sys.setrecursionlimit(200000000)
from inspect import currentframe
# my functions here!
#標準エラー出力
def printargs2err(*args):
names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}
print(',... | [] | 532,404 | 532,405 | u857428111 | python |
p02754 | n, a, b = map(int, input().split())
if a == 0:
print(0)
exit()
ans = a*n//(a+b) + min(a, n%(a+b))
print(ans) | n, a, b = map(int, input().split())
if a == 0:
print(0)
exit()
# print(n//(a+b))
# print(min(a, n%(a+b)))
# print("--------")
ans = a * (n//(a+b)) + min(a, n%(a+b))
print(ans) | [] | 532,411 | 532,412 | u353895424 | python |
p02754 | def resolve():
n, a, b = map(int, input().split())
ans = (n // (a + b)) * a
ans += min(b, n % (a+b))
print(ans)
return
if __name__ == "__main__":
resolve()
| def resolve():
n, a, b = map(int, input().split())
ans = (n // (a + b)) * a
ans += min(a, n % (a+b))
print(ans)
return
if __name__ == "__main__":
resolve()
| [
"identifier.change",
"call.arguments.change"
] | 532,421 | 532,422 | u733814820 | python |
p02754 |
N, A, B = map(int, input().split())
m = N//(A+B)
r = N%(A+B)
print(m*A+min(B, r)) |
N, A, B = map(int, input().split())
m = N//(A+B)
r = N%(A+B)
print(m*A+min(A, r)) | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 532,430 | 532,431 | u333190709 | python |
p02754 | n,a,b=map(int,input().split())
if n%(a+b)>=a:
s=a
else:
s=n%(a+b)
print(n//(a+b)+s) | n,a,b=map(int,input().split())
if n%(a+b)>=a:
s=a
else:
s=n%(a+b)
print(n//(a+b)*a+s) | [
"expression.operation.binary.add"
] | 532,434 | 532,435 | u768256617 | python |
p02754 | N, A, B = map(int, input().split())
if(N%(A+B) <= A):
ans = (N//(A+B))*A+N%(A+B)
else:
ans = (N//(A+B))*A
print(ans) | N, A, B = map(int, input().split())
if(N%(A+B) <= A):
ans = (N//(A+B))*A+N%(A+B)
else:
ans = (N//(A+B)+1)*A
print(ans) | [
"assignment.change"
] | 532,478 | 532,479 | u995062424 | python |
p02754 | List = list(map(int, input().split()))
Set0 = List[0]//(List[1]+List[2])
Blue = Set0 * List[1] + (List[0] - (List[1]+List[2])*Set0)
print(Blue) | List = list(map(int, input().split()))
Set0 = List[0]//(List[1]+List[2])
Blue = Set0 * List[1] + min(List[0] - (List[1]+List[2])*Set0, List[1])
print(Blue) | [
"call.add",
"call.arguments.add"
] | 532,484 | 532,485 | u374551537 | python |
p02754 | n,a,b = map(int, input().split())
t = n%(a+b)
if n < (a+b):
print(a)
else:
if a > t > 0:
print(n//(a+b)*a+t)
elif t >= a:
print(n//(a+b)*a+a)
else:
print(n//(a+b)*a) | n,a,b = map(int, input().split())
t = n%(a+b)
if n < a:
print(n)
else:
if a > t > 0:
print(n//(a+b)*a+t)
elif t >= a:
print(n//(a+b)*a+a)
else:
print(n//(a+b)*a) | [
"control_flow.branch.if.condition.change",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 532,506 | 532,507 | u901757711 | python |
p02754 | n,a,b=map(int,input().split())
ct=a+b
num=(n/ct)*a
s=n%ct
result=num+min(s,a)
print(int(result)) | n,a,b=map(int,input().split())
ct=a+b
num=(n//ct)*a
s=n%ct
result=num
result += min(s,a)
print(int(result)) | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 532,519 | 532,520 | u273186459 | python |
p02754 | n, a, b = list(map(int, input().split()))
print(int((n//(a+b))*a + n-(n//(a+b)*(a+b))))
| n, a, b = list(map(int, input().split()))
print(int((n//(a+b))*a + min(n-(n//(a+b)*(a+b)), a)))
| [
"call.add",
"call.arguments.add"
] | 532,530 | 532,531 | u657901243 | python |
p02754 | N,B,R = map(int,input().split())
a = N % (B + R)
b = N // (B + R) * B
if a >= B:
b += a
else:
b += a
print(b) | N,B,R = map(int,input().split())
a = N % (B + R)
b = N // (B + R) * B
if a >= B:
b += B
else:
b += a
print(b) | [
"identifier.change"
] | 532,544 | 532,545 | u547764399 | python |
p02754 |
N, A, B = list(map(int, input().split()))
i = 0
b = 0
r = 0
c = N//(A+B)
#print(c)
d = N%(A+B)
#print(d)
if d <= A:
b = c*A + d
else:
b = c*(A+1)
print(b)
|
N, A, B = list(map(int, input().split()))
i = 0
b = 0
r = 0
c = N//(A+B)
#print(c)
d = N%(A+B)
#print(d)
if d <= A:
b = c*A + d
else:
b = (c+1)*A
print(b)
| [
"expression.operation.binary.remove",
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 532,574 | 532,575 | u304593245 | python |
p02754 | a,b,c=map(int,input().split())
if b==0:
print(0)
else:
print(b*(a//(b+c))+a%(b+c)) | a,b,c=map(int,input().split())
if b==0:
print(0)
else:
print(b*(a//(b+c))+min(b,a%(b+c))) | [
"call.add",
"call.arguments.change"
] | 532,576 | 532,577 | u769870836 | python |
p02754 | N, A, B = map(int, input().split())
set = N // (A + B)
rest = N - set * (A + B)
if rest <= A:
ans = A * set + rest
else:
ans = (A+1) * set
print(ans) | N, A, B = map(int, input().split())
set = N // (A + B)
rest = N - set * (A + B)
if rest <= A:
ans = A * set + rest
else:
ans = A * (set + 1)
print(ans) | [
"expression.operation.binary.remove"
] | 532,578 | 532,579 | u430336181 | python |
p02754 | def resolve():
n, a, b = map(int, input().split())
total = a + b
print(n // total * a + (n % total) if n % total <= a else a)
resolve() | def resolve():
n, a, b = map(int, input().split())
total = a + b
print(n // total * a + (n % total if n % total < a else a))
resolve() | [
"call.arguments.change",
"expression.operator.compare.change",
"io.output.change"
] | 532,584 | 532,585 | u729915102 | python |
p02754 | n,a,b=map(int,input().split())
temp=int(n/(a+b))*a
if n-int(n/(a+b))*(a+b)<=a:
result=temp+a
else:
result=temp+n-int(n/(a+b))*(a+b)
print(result) | n,a,b=map(int,input().split())
temp=int(n/(a+b))*a
if n-int(n/(a+b))*(a+b)>=a:
result=temp+a
else:
result=temp+n-int(n/(a+b))*(a+b)
print(result) | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 532,586 | 532,587 | u629350026 | python |
p02754 | import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math ... | import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math ... | [
"call.add",
"call.arguments.add"
] | 532,603 | 532,604 | u029000441 | python |
p02754 | n, a, b = map(int, input().split())
d = n // (a + b)
ans = d * a
if (n - d * (a + b) <= b):
ans += n - d * (a + b)
else:
ans += a
print(ans)
| n, a, b = map(int, input().split())
d = n // (a + b)
ans = d * a
if (n - d * (a + b) <= a):
ans += n - d * (a + b)
else:
ans += a
print(ans)
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 532,607 | 532,608 | u765690804 | python |
p02754 | N, A, B = map(int, input().split())
if A==0:
print(0)
exit()
if A>=N:
print(N)
else:
if A+B>=N:
print(A)
else:
s, a = divmod(N, A+B)
print(s*A+a) | N, A, B = map(int, input().split())
if A==0:
print(0)
exit()
if A>=N:
print(N)
else:
if A+B>=N:
print(A)
else:
s, a = divmod(N, A+B)
print(s*A+min(A, a))
| [
"call.add",
"call.arguments.change"
] | 532,609 | 532,610 | u047796752 | python |
p02754 | n,a,b=map(int,input().split())
ans=b*(n//(a+b))
ans+=min(b,n%(a+b))
print(ans) | n,a,b=map(int,input().split())
ans=a*(n//(a+b))
ans+=min(a,n%(a+b))
print(ans)
| [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change",
"call.arguments.change"
] | 532,611 | 532,612 | u227082700 | python |
p02754 | n, a, b = map(int, input().split())
cnt = 0
cnt += a * n//(a+b)
x = n % (a+b)
if x > a:
cnt += a
else:
cnt += x
print(cnt) | n, a, b = map(int, input().split())
cnt = 0
cnt += a * (n//(a+b))
x = n % (a+b)
if x > a:
cnt += a
else:
cnt += x
print(cnt) | [] | 532,623 | 532,624 | u431573188 | python |
p02754 | n,a,b=map(int,input().split())
if n%(a+b)>a:
print((n//(a+b))*a)
else:
print((n//(a+b))*a+(n%(a+b))) | n,a,b=map(int,input().split())
if n%(a+b)>a:
print((n//(a+b))*a+a)
else:
print((n//(a+b))*a+(n%(a+b))) | [
"expression.operation.binary.add"
] | 532,625 | 532,626 | u549603397 | python |
p02754 | #! /usr/bin/env python3
from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations,... | #! /usr/bin/env python3
from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations,... | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 532,634 | 532,635 | u203669169 | python |
p02754 | N,A,B = map(int, input().split()) #数字
if N % (A + B) <= A:
print(N // (A + B) * A + N % (A + B))
else:
print(N // (A + B) + A) | N,A,B = map(int, input().split()) #数字
if N % (A + B) <= A:
print(N // (A + B) * A + N % (A + B))
else:
print(N // (A + B) * A + A) | [
"expression.operation.binary.add"
] | 532,637 | 532,638 | u620238824 | python |
p02754 | n,a,b = map(int,input().split())
c = a + b #一つの塊
d = n //c #塊が何個あるか
e = n%c #塊じゃないものが何個残るか
katamariblue = a*d
if e >=b:
blue = b
else:
blue = e
print(blue + katamariblue) | n,a,b = map(int,input().split())
c = a + b #一つの塊
d = n //c #塊が何個あるか
e = n%c #塊じゃないものが何個残るか
katamariblue = a*d
if e >=a:
blue = a
else:
blue = e
print(blue + katamariblue) | [
"identifier.change",
"control_flow.branch.if.condition.change",
"assignment.value.change"
] | 532,646 | 532,647 | u054931633 | python |
p02754 | n,a,b = map(int, input().split())
ab=a+b
print(n//ab*a + n-n//ab*(ab)) | n,a,b = map(int, input().split())
ab=a+b
print(n//ab*a + min(n-n//ab*(ab),a)) | [
"call.add",
"call.arguments.add",
"call.arguments.change"
] | 532,670 | 532,671 | u521323621 | python |
p02754 | N, A, B = map(int, input().split())
d = N % (A + B)
c = N // (A + B)
print(d + c * A) | N, A, B = map(int, input().split())
d = N % (A + B)
c = N // (A + B)
print(min(d, A) + c * A) | [
"call.add",
"call.arguments.add"
] | 532,674 | 532,675 | u186121428 | python |
p02754 | N,A,B = (int(x) for x in input().split())
Kurikaeshi = N // (A + B)
Amari = N % (A + B)
Aoi = 0
if Amari >= B:
Aoi = A
else:
Aoi = Amari
result = Aoi + Kurikaeshi * A
print(result)
| N,A,B = (int(x) for x in input().split())
Kurikaeshi = N // (A + B)
Amari = N % (A + B)
Aoi = 0
if Amari >= A:
Aoi = A
else:
Aoi = Amari
result = Aoi + Kurikaeshi * A
print(result)
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 532,676 | 532,677 | u916662650 | python |
p02754 | N,A,B = (int(x) for x in input().split())
Kurikaeshi = N // (A + B)
Amari = N % (A + B)
Aoi = 0
if Amari >= B:
Aoi = B
else:
Aoi = Amari
result = Aoi + Kurikaeshi * A
print(result)
| N,A,B = (int(x) for x in input().split())
Kurikaeshi = N // (A + B)
Amari = N % (A + B)
Aoi = 0
if Amari >= A:
Aoi = A
else:
Aoi = Amari
result = Aoi + Kurikaeshi * A
print(result)
| [
"identifier.change",
"control_flow.branch.if.condition.change",
"assignment.value.change"
] | 532,678 | 532,677 | u916662650 | python |
p02754 | import math
import queue
from collections import defaultdict
def readInt():
return int(input())
def readInts():
return list(map(int, input().split()))
def readChar():
return input()
def readChars():
return input().split()
def factorization(n):
res = []
if n%2==0:
res.append(2)
for i in range(3,math.floor(n//... | import math
import queue
from collections import defaultdict
def readInt():
return int(input())
def readInts():
return list(map(int, input().split()))
def readChar():
return input()
def readChars():
return input().split()
def factorization(n):
res = []
if n%2==0:
res.append(2)
for i in range(3,math.floor(n//... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 532,685 | 532,686 | u509739538 | python |
p02754 | import sys
input = sys.stdin.readline
def main():
N, A, B = map(int, input().split())
answer = N*A // (A+B) + min(N % (A+B), A)
print(answer)
if __name__ == '__main__':
main()
| import sys
input = sys.stdin.readline
def main():
N, A, B = map(int, input().split())
answer = N // (A + B) * A + min(N % (A + B), A)
print(answer)
if __name__ == '__main__':
main()
| [
"expression.operation.binary.remove"
] | 532,687 | 532,688 | u061566631 | python |
p02754 | # -*- coding: utf-8 -*-
n, a, b = map(int, input().split())
loop_count = n // (a + b)
amari = n % (a + b)
amari_a = a
if amari < a:
amari_a = amari
print(a * loop_count + amari)
| # -*- coding: utf-8 -*-
n, a, b = map(int, input().split())
loop_count = n // (a + b)
amari = n % (a + b)
amari_a = a
if amari < a:
amari_a = amari
print(a * loop_count + amari_a) | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 532,689 | 532,690 | u123849536 | python |
p02754 | N,A,B=map(int, input().split())
len=A+B
print((N / len)* A + min(A, N % len))
| N,A,B=map(int, input().split())
len=A+B
print((N // len)* A + min(A, N % len))
| [
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 532,693 | 532,694 | u746154235 | python |
p02754 | n, a, b = map(int, input().split())
NumberOfRotations = int(n/(a+b))
surplus = n%(a+b)
ans = 0
if NumberOfRotations == 0:
if a > n:
print(surplus)
exit
else:
print(a)
exit
ans = a*NumberOfRotations
if a > n - ((a+b)*NumberOfRotations):
print(ans+surplus)
else:
print(a... | n, a, b = map(int, input().split())
NumberOfRotations = int(n/(a+b))
surplus = n%(a+b)
ans = 0
if NumberOfRotations == 0:
if a > n:
print(surplus)
exit()
else:
print(a)
exit()
ans = a*NumberOfRotations
if a > n - ((a+b)*NumberOfRotations):
print(ans+surplus)
else:
pri... | [
"call.add"
] | 532,697 | 532,698 | u394040864 | python |
p02754 | n, a, b = map(int, input().split())
NumberOfRotations = int(n/(a+b))
surplus = n%(a+b)
ans = 0
if NumberOfRotations == 0:
if a > n:
print(surplus)
exit
else:
print(a)
exit
ans = a*NumberOfRotations
if a > n - ((a+b)*NumberOfRotations):
print(ans+surplus)
else:
print(a... | n, a, b = map(int, input().split())
NumberOfRotations = int(n/(a+b))
surplus = n%(a+b)
ans = 0
if NumberOfRotations == 0:
if a > n:
print(surplus)
else:
print(a)
else:
ans = a*NumberOfRotations
if a > n - ((a+b)*NumberOfRotations):
print(ans+surplus)
else:
print(an... | [] | 532,697 | 532,699 | u394040864 | python |
p02754 | N, A, B = map(int, input().split())
if A == 0:
print(0)
exit()
P = A + B
X = N//P
x = N%P
if x >= A:
ans = A*X+4
elif x < A:
ans = A*X+x
print(ans) | N, A, B = map(int, input().split())
if A == 0:
print(0)
exit()
P = A + B
X = N//P
x = N%P
if x >= A:
ans = A*X+A
elif x < A:
ans = A*X+x
print(ans) | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operation.binary.change"
] | 532,715 | 532,716 | u301195216 | python |
p02754 | N, A, B = map(int, input().split())
if A == 0:
print(0)
exit()
P = A + B
X = N//P
x = N%P
if x >= A:
ans = A*X+4
print(ans)
elif x < A:
ans = A*X+x
print(ans) | N, A, B = map(int, input().split())
if A == 0:
print(0)
exit()
P = A + B
X = N//P
x = N%P
if x >= A:
ans = A*X+A
elif x < A:
ans = A*X+x
print(ans) | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operation.binary.change",
"call.remove"
] | 532,717 | 532,716 | u301195216 | python |
p02754 | N,A,B=[int(x) for x in input().rstrip().split()]
ans=N//(A+B)
amari=N%(A+B)
if B<=amari:
amari=B
ans1=ans*A+amari
print(ans1) | N,A,B=[int(x) for x in input().rstrip().split()]
ans=N//(A+B)
amari=N%(A+B)
if A<=amari:
amari=A
ans1=ans*A+amari
print(ans1) | [
"identifier.change",
"control_flow.branch.if.condition.change",
"assignment.value.change"
] | 532,728 | 532,729 | u235376569 | python |
p02754 | N,a,b=map(int,input().split())
c=N//(a+b)
d=N%(a+b)
if d<=a:
print(c*b+d)
else:
print(c*b+a)
| N,a,b=map(int,input().split())
c=N//(a+b)
d=N%(a+b)
if d<=a:
print(c*a+d)
else:
print(c*a+a) | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 532,734 | 532,735 | u830162518 | python |
p02754 | N, A, B = map(int, input().split())
pattern = N // (A + B)
ans += A * pattern
ans += min(N - (A + B) * pattern, A)
print(ans) | N, A, B = map(int, input().split())
pattern = N // (A + B)
ans = 0
ans += A * pattern
ans += min(N - (A + B) * pattern, A)
print(ans)
| [
"assignment.add"
] | 532,748 | 532,749 | u411858517 | python |
p02754 | n,a,b = map(int, input().split())
q, mod = divmod(n, a+b)
print(q*a + mod) | n,a,b = map(int, input().split())
q, mod =divmod(n, a+b)
print(q*a + min(mod,a)) | [
"call.add",
"call.arguments.add",
"call.arguments.change"
] | 532,765 | 532,766 | u670819023 | python |
p02754 | N,A,B=list(map(int,input().split()))
print(A*(N//(A+B))+max(A,N%(A+B))) | N,A,B=list(map(int,input().split()))
print(A*(N//(A+B))+min(A,N%(A+B))) | [
"misc.opposites",
"identifier.change",
"call.function.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 532,784 | 532,785 | u999482355 | python |
p02754 | N,A,B=map(int,input().split())
m=A+B
x=int(N/m)
y=int(N%m)
if y<=A:
print(x*A+y)
else:
print(A*(X+1))
| N,A,B=map(int,input().split())
m=A+B
x=int(N/m)
y=int(N%m)
if y<=A:
print(x*A+y)
else:
print(A*(x+1))
| [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 532,792 | 532,793 | u443577878 | python |
p02754 | N,A,B=map(int,input().split())
m=A+B
x=int(N/m)
y=int(N%m)
if y<=A:
print(x*A+y)
else:
print(x*(A+1))
| N,A,B=map(int,input().split())
m=A+B
x=int(N/m)
y=int(N%m)
if y<=A:
print(x*A+y)
else:
print(A*(x+1))
| [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 532,794 | 532,793 | u443577878 | python |
p02754 | n,a,b = map(int,input().split())
sum = n//(a+b)*a
res = n%(a*b)
sum += min(res,a)
print(sum) | n,a,b = map(int,input().split())
sum = n//(a+b)*a
res = n%(a+b)
sum += min(res,a)
print(sum) | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 532,818 | 532,819 | u725993280 | python |
p02754 | N,A,B=map(int, input().split())
a=(N//(A+B))*A
b=N%(A+B)
if b >= B:
a+=A
else:
a+=b
print(a) | N,A,B=map(int, input().split())
a=(N//(A+B))*A
b=N%(A+B)
if b >= A:
a+=A
else:
a+=b
print(a) | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 532,841 | 532,842 | u250061066 | python |
p02754 | N, A, B = map(int, input().split())
q, mod = divmod(N, A + B)
print(q * A + mod) if mod <= A else print(q * A + (mod - B)) | N, A, B = map(int, input().split())
q, mod = divmod(N, A + B)
print(q * A + mod) if mod <= A else print(q * A + A) | [
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 532,845 | 532,846 | u329785342 | python |
p02754 |
n,a,b = map(int,input().split())
num = 0
num = n // (a+b)
if n % (a+b) <= a:
print((n*a)+ (n % (a+b)))
else:
print((n*a)+a)
|
n,a,b = map(int,input().split())
num = 0
num = n // (a+b)
if n % (a+b) <= a:
print((num*a)+ (n % (a+b)))
else:
print((num*a)+a)
| [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 532,847 | 532,848 | u102242691 | python |
p02754 |
n,a,b = map(int,input().split())
num = 0
num = n // (a+b)
if num % (a+b) <=a:
print((num*a)+ (num % (a+b)))
else:
print((num*a)+a)
|
n,a,b = map(int,input().split())
num = 0
num = n // (a+b)
if n % (a+b) <= a:
print((num*a)+ (n % (a+b)))
else:
print((num*a)+a)
| [
"identifier.change",
"control_flow.branch.if.condition.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 532,849 | 532,848 | u102242691 | python |
p02754 | import sys
n, a, b = map(int, sys.stdin.readline().split())
balls = n * a // (a+b)
if n % (a+b) <= a:
balls += n % (a+b)
else:
balls += a
print(balls) | import sys
n, a, b = map(int, sys.stdin.readline().split())
balls = n // (a+b) * a
if n % (a+b) <= a:
balls += n % (a+b)
else:
balls += a
print(balls)
| [
"expression.operation.binary.remove"
] | 532,863 | 532,864 | u823885866 | python |
p02754 | import sys
n, a, b = map(int, sys.stdin.readline().split())
balls = n * a // (a+b)
if n % (a+b) <= a:
balls += n % (a+b)
else:
balls += a
print(balls)
| import sys
n, a, b = map(int, sys.stdin.readline().split())
balls = n // (a+b) * a
if n % (a+b) <= a:
balls += n % (a+b)
else:
balls += a
print(balls)
| [
"expression.operation.binary.remove"
] | 532,865 | 532,864 | u823885866 | python |
p02754 | import sys
n, a, b = map(int, sys.stdin.readline().split())
balls = n * a / (a+b)
if n % (a+b) <= a:
balls += n % (a+b)
else:
balls += a
print(balls) | import sys
n, a, b = map(int, sys.stdin.readline().split())
balls = n // (a+b) * a
if n % (a+b) <= a:
balls += n % (a+b)
else:
balls += a
print(balls)
| [
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 532,867 | 532,864 | u823885866 | python |
p02754 | n, a, b = map(int, input().split())
ans = n //(a+b) * a
rem = n % (a+b)
#ans += min(rem, a)
ans += rem
print(ans) | n, a, b = map(int, input().split())
ans = n //(a+b) * a
rem = n % (a+b)
ans += min(rem, a)
#ans += rem
print(ans) | [
"call.add",
"call.arguments.add"
] | 532,878 | 532,879 | u709079466 | python |
p02754 | #!/usr/bin/env python3
N, A, B = map(int, input().split())
print((N//(A+B))*A + (N%(A+B))) | #!/usr/bin/env python3
N, A, B = map(int, input().split())
print((N//(A+B))*A + min(A, (N%(A+B)))) | [
"call.add",
"call.arguments.change"
] | 532,889 | 532,890 | u756420279 | python |
p02754 | #!/usr/bin/env python3
N, A, B = map(int, input().split())
print((N//(A+B))*A + (N%(A+B))) | #!/usr/bin/env python3
N, A, B = map(int, input().split())
print((N//(A + B))*A + min(A, (N%(A + B)))) | [
"call.add",
"call.arguments.change"
] | 532,889 | 532,891 | u756420279 | python |
p02754 | n,a,b = map(int,input().split())
c = a + b
ans = n//c*b + min(n%c,b)
print(ans)
| n,a,b = map(int,input().split())
c = a + b
ans = n//c*a + min(n%c,a)
print(ans)
| [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change",
"call.arguments.change"
] | 532,905 | 532,906 | u989089752 | python |
p02754 | N, A, B = map(int, input().split())
r = N//(A+B)
print(r*A+min(B, N-r*(A+B))) | N, A, B = map(int, input().split())
r = N//(A+B)
print(r*A+min(A, N-r*(A+B))) | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 532,918 | 532,919 | u276204978 | python |
p02754 | N,A,B =map(int,input().split())
num=N//(A+B)
num2=N-num*(A+B)
if num > A:
print(num*A+A)
else:
print(num*A+num2) | N,A,B =map(int,input().split())
num=N//(A+B)
num2=N-num*(A+B)
if num2 > A:
print(num*A+A)
else:
print(num*A+num2) | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 532,930 | 532,931 | u538537141 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.