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 |
|---|---|---|---|---|---|---|---|
p02682 | import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
from bisect import bisect_left, bisect_right, insort
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def MS(): return map(str,sys.s... | import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
from bisect import bisect_left, bisect_right, insort
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def MS(): return map(str,sys.s... | [] | 408,443 | 408,444 | u664907598 | python |
p02682 | import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
from bisect import bisect_left, bisect_right, insort
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def MS(): return map(str,sys.s... | import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
from bisect import bisect_left, bisect_right, insort
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def MS(): return map(str,sys.s... | [
"identifier.change",
"call.arguments.change",
"io.output.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 408,445 | 408,444 | u664907598 | python |
p02682 | # -*- coding: utf-8 -*-
A, B, C, K = map(int, input().split())
ans = 0
if K <= A:
ans = A
elif K <= A + B:
ans = A
else:
ans = A - (K - A - B)
print(ans) | # -*- coding: utf-8 -*-
A, B, C, K = map(int, input().split())
ans = 0
if K <= A:
ans = K
elif K <= A + B:
ans = A
else:
ans = A - (K - A - B)
print(ans) | [
"assignment.value.change",
"identifier.change"
] | 408,460 | 408,461 | u511096055 | python |
p02682 | import sys
input = sys.stdin.readline
import numpy as np
A, B, C, K= map(int, input().split())
ans = 0
if A <= K:
ans += A
K -= A
else:
ans += K
K -= K
if (K != 0) and (B <= K):
K -= B
else:
K -= K
if (K != 0) and (C <= K):
K -= C
K -= C
else:
ans -= K
K -= K
print(ans) | import sys
input = sys.stdin.readline
import numpy as np
A, B, C, K= map(int, input().split())
ans = 0
if A < K:
ans += A
K -= A
else:
ans += K
K -= K
if (K != 0) and (B < K):
K -= B
else:
K -= K
if (K != 0) and (C < K):
K -= C
K -= C
else:
ans -= K
K -= K
print(ans) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,469 | 408,470 | u459215900 | python |
p02682 | a,b,c,k=map(int,input().split())
sm=0
if k<=a:
sm=a
else:
sm+=a
k=k-a
if k>=b:
k=k-b
if k!=0:
sm-=k
print(sm) | a,b,c,k=map(int,input().split())
sm=0
if k<=a:
sm=k
else:
sm+=a
k=k-a
if k>=b:
k=k-b
if k!=0:
sm-=k
print(sm) | [
"assignment.value.change",
"identifier.change"
] | 408,473 | 408,474 | u234454594 | python |
p02682 | a,b,c,k=map(int,input().split())
sm=0
if k<=a:
sm=a
else:
sm+=a
k=k-a
if k>b:
k=k-b
if k!=0:
sm-=k
print(sm) | a,b,c,k=map(int,input().split())
sm=0
if k<=a:
sm=k
else:
sm+=a
k=k-a
if k>=b:
k=k-b
if k!=0:
sm-=k
print(sm) | [
"assignment.value.change",
"identifier.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,475 | 408,474 | u234454594 | python |
p02682 | (A, B, C, K) = list(map(int, input().split()))
items = [
(A, 1),
(B, 0),
(C, -1)
]
_sum = 0
k = K
for num_cards, val in items:
if num_cards <= k:
num = num_cards
k -= num_cards
else:
num = k
_sum += (val * num)
if k == 0:
break
print(_sum)
| (A, B, C, K) = list(map(int, input().split()))
items = [
(A, 1),
(B, 0),
(C, -1)
]
_sum = 0
k = K
for num_cards, val in items:
if num_cards <= k:
num = num_cards
k -= num_cards
else:
num = k
k = 0
_sum += (val * num)
if k == 0:
break
print(_sum)
| [
"assignment.add"
] | 408,486 | 408,487 | u151820863 | python |
p02682 | a,b,c,k=map(int,input().split())
if k<=a:
print(1*a)
else:
if k-a<=b:
print(1*a)
else:
print(1*a-1*(k-a-b)) | a,b,c,k=map(int,input().split())
if k<=a:
print(1*k)
else:
if k-a<=b:
print(1*a)
else:
print(1*a-1*(k-a-b)) | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 408,488 | 408,489 | u726154863 | python |
p02682 | a,b,c,k=map(int,input().split())
if k<=a:
print(1*a)
else:
if k-a<=b:
print(1*(k-a))
else:
print(1*a-1*(k-a-b)) | a,b,c,k=map(int,input().split())
if k<=a:
print(1*k)
else:
if k-a<=b:
print(1*a)
else:
print(1*a-1*(k-a-b)) | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 408,490 | 408,489 | u726154863 | python |
p02682 | A, B, C, K = map(int, input().split())
if A >= K:
print(A)
elif A < K and A+B >= K:
print(A)
else:
print(A-(K-A-B)) | A, B, C, K = map(int, input().split())
if A >= K:
print(K)
elif A < K and A+B >= K:
print(A)
else:
print(A-(K-A-B)) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,491 | 408,492 | u274644863 | python |
p02682 | def q2():
A, B, C, K = (int(i) for i in input().split())
ans = 0
if K <= A:
ans += A
return ans
else:
K -= A
ans += A
if K <= B:
return ans
else:
K -= B
if K <= C:
ans -= K
return ans
else:
ans -= C
return... | def q2():
A, B, C, K = (int(i) for i in input().split())
ans = 0
if K <= A:
ans += K
return ans
else:
K -= A
ans += A
#print(K, ans)
if K <= B:
return ans
else:
K -= B
#print(K, ans)
if K <= C:
ans -= K
return ans
... | [
"identifier.change"
] | 408,495 | 408,496 | u894074703 | python |
p02682 | def q2():
A, B, C, K = (int(i) for i in input().split())
ans = 0
if K <= A:
ans += A
return ans
else:
K -= A
ans += A
#print(K)
if K <= B:
return ans
else:
K -= B
#print(K)
if K > C:
ans -= C
return ans
else:
... | def q2():
A, B, C, K = (int(i) for i in input().split())
ans = 0
if K <= A:
ans += K
return ans
else:
K -= A
ans += A
#print(K, ans)
if K <= B:
return ans
else:
K -= B
#print(K, ans)
if K <= C:
ans -= K
return ans
... | [
"identifier.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,497 | 408,496 | u894074703 | python |
p02682 | A, B, C, K = map(int,input().split())
if K < A:
print(K)
elif A < K <= A + B:
print(A)
else:
print(2*A + B - K) | A, B, C, K = map(int,input().split())
if K <= A:
print(K)
elif A < K <= A + B:
print(A)
else:
print(2*A + B - K) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,498 | 408,499 | u939026953 | python |
p02682 | A,B,C,K = map(int,input().split())
answer = 0
if K <= A:
print(K)
elif K > A:
answer = A
K = K - A
if K <= B and K > 0 :
print(answer)
elif K > B:
K = K - B
if K <= C and K > 0:
answer = answer - K
print(answer) | A,B,C,K = map(int,input().split())
answer = 0
if K <= A:
print(K)
K = 0
elif K > A:
answer = A
K = K - A
if K <= B and K > 0 :
print(answer)
K = 0
elif K > B:
K = K - B
if K <= C and K > 0:
answer = answer - K
print(answer) | [
"assignment.add"
] | 408,504 | 408,505 | u949210009 | python |
p02682 | a, b, c, k = map(int, input().split())
if k <= a:
print(a)
elif a < k <= a + b:
print(a)
else:
print(a - (k - a - b)) | a, b, c, k = map(int, input().split())
if k <= a:
print(k)
elif a < k <= a + b:
print(a)
else:
print(a - (k - a - b)) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,506 | 408,507 | u548545174 | python |
p02682 | a, b, c, k = map(int, input().split())
if a >= k:
print(a)
exit()
else:
k -= a
k -= b
if k > 0:
print(a - k)
else:
print(a)
| a, b, c, k = map(int, input().split())
if a >= k:
print(k)
exit()
else:
k -= a
k -= b
if k > 0:
print(a - k)
else:
print(a)
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,512 | 408,513 | u167681750 | python |
p02682 | a, b, c, k = map(int, input().split())
ans = 0
if k <= a:
ans = k
if k >= a + b:
ans = ans - (k - (a+b))
print(ans)
| a, b, c, k = map(int, input().split())
ans = a
if k < a:
ans = k
if k > a + b:
ans = ans - (k - (a+b))
print(ans)
| [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,516 | 408,517 | u084865106 | python |
p02682 | a, b, c, k = map(int, input().split())
ans = 1
if k <= a:
ans = k
if k > a + b:
ans = ans - (k - (a+b))
print(ans)
| a, b, c, k = map(int, input().split())
ans = a
if k < a:
ans = k
if k > a + b:
ans = ans - (k - (a+b))
print(ans)
| [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,518 | 408,517 | u084865106 | python |
p02682 | A,B,C,K=map(int,input().split())
if A>=K:
print(A)
else:
x=K-A
if x<B:
print(A)
else:
y=K-A-B
print(A-y)
| A,B,C,K=map(int,input().split())
if A>=K:
print(K)
else:
x=K-A
if x<=B:
print(A)
else:
y=K-A-B
print(A-y)
| [
"identifier.change",
"call.arguments.change",
"io.output.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,521 | 408,522 | u613233323 | python |
p02682 | A,B,C,K=map(int,input().split())
if A>=K:
print(A)
else:
x=K-A
if x<=B:
print(A)
else:
y=K-A-B
print(A-y)
| A,B,C,K=map(int,input().split())
if A>=K:
print(K)
else:
x=K-A
if x<=B:
print(A)
else:
y=K-A-B
print(A-y)
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,523 | 408,522 | u613233323 | python |
p02682 | a,b,c,k= map(int, input().split())
if k<= a:
print(k)
elif k <= a+b:
print(a)
else:
print(2*a-k) | a,b,c,k= map(int, input().split())
if k<= a:
print(k)
elif k <= a+b:
print(a)
else:
print(2*a+b-k) | [
"expression.operation.binary.add"
] | 408,526 | 408,527 | u076018778 | python |
p02682 | a, b, c, k = map(int, input().split())
total=0
total+=a
if k - a == 0:
print(total)
elif k - a < 0:
print(total-k)
else:
k-=a
if k - b <= 0:
print(total)
else:
k-=b
print(total-k) | a, b, c, k = map(int, input().split())
total=0
total+=a
if k - a == 0:
print(total)
elif k - a < 0:
print(k)
else:
k-=a
if k - b <= 0:
print(total)
else:
k-=b
print(total-k) | [
"expression.operation.binary.remove"
] | 408,535 | 408,536 | u357867755 | python |
p02682 | A,B,C,K = map(int,input().split())
if A >= K:
print(K)
elif A + B >= K:
print(K)
else:
print(A - (K-(A+B))) | A,B,C,K = map(int,input().split())
if A >= K:
print(K)
elif A + B >= K:
print(A)
else:
print(A - (K-(A+B))) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,546 | 408,547 | u404789658 | python |
p02682 |
A,B,C,K = map(int,input().split())
if A>=K:
print(A)
elif (A+B)>=K:
print(A)
else:
S = K-(A+B)
print(A-S) | A,B,C,K = map(int,input().split())
if A>=K:
print(K)
elif A+B>=K:
print(A)
else:
S = K-(A+B)
print(A-S) | [
"identifier.change",
"call.arguments.change",
"io.output.change",
"control_flow.branch.if.condition.change"
] | 408,550 | 408,551 | u385649291 | python |
p02682 | a,b,c,k = map(int,input().split())
if a >= k:
print(a)
elif b >= k-a:
print(a)
else:
print(a-(k-a-b))
| a,b,c,k = map(int,input().split())
if a >= k:
print(k)
elif b >= k-a:
print(a)
else:
print(a-(k-a-b)) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,562 | 408,563 | u548093253 | python |
p02682 | a, b, c, k = map(int, input().split())
if k <= a:
ans = a
else:
ans = a
k = k - a
# print("a")
if k >= b:
k = k - b
ans += k * (-1)
print(ans) | a, b, c, k = map(int, input().split())
if k <= a:
ans = k
else:
ans = a
k = k - a
# print("a")
if k >= b:
k = k - b
ans += k * (-1)
print(ans) | [
"assignment.value.change",
"identifier.change"
] | 408,583 | 408,584 | u373703188 | python |
p02682 | a,b,c,k=map(int,(input().split()))
if a >= k:
print(a)
else:
if a + b > k:
print(a)
else:
d = k -(a + b)
print(a-d)
| a,b,c,k=map(int,(input().split()))
if a >= k:
print(k)
else:
if a + b > k:
print(a)
else:
d = k -(a + b)
print(a-d)
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,585 | 408,586 | u940332739 | python |
p02682 | from sys import stdin
A, B, C, K = map(int, stdin.readline().rstrip().split())
res = int(0)
def f(p, n, k, res):
if (k - n) >= 0:
return k - n, p * (k - n) + res
else:
return 0, p * k + res
K, res = f(1, A, K, res)
K, res = f(0, B, K, res)
_, res = f(-1, C, K, res)
print(res) | from sys import stdin
A, B, C, K = map(int, stdin.readline().rstrip().split())
res = int(0)
def f(p, n, k, res):
if (k - n) >= 0:
return k - n, p * n + res
else:
return 0, p * k + res
K, res = f(1, A, K, res)
K, res = f(0, B, K, res)
_, res = f(-1, C, K, res)
print(res) | [] | 408,587 | 408,588 | u543489264 | python |
p02682 | from sys import stdin
A, B, C, K = map(int, stdin.readline().rstrip().split())
res = int(0)
def f(p, n, k, res):
if (k - n) > 0:
return k - n, p * (k - n) + res
else:
return 0, p * k + res
K, res = f(1, A, K, res)
K, res = f(0, B, K, res)
_, res = f(-1, C, K, res)
print(res) | from sys import stdin
A, B, C, K = map(int, stdin.readline().rstrip().split())
res = int(0)
def f(p, n, k, res):
if (k - n) >= 0:
return k - n, p * n + res
else:
return 0, p * k + res
K, res = f(1, A, K, res)
K, res = f(0, B, K, res)
_, res = f(-1, C, K, res)
print(res) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,589 | 408,588 | u543489264 | python |
p02682 | A, B, C, K = map(int, input().split())
if A >= K:
print(K)
elif A+B >= K:
print(A)
else:
print(A-(C-K+B)) | A, B, C, K = map(int, input().split())
if A >= K:
print(K)
elif A+B >= K:
print(A)
else:
print(A-(K-A-B)) | [
"expression.operation.binary.remove",
"misc.opposites",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 408,590 | 408,591 | u195177386 | python |
p02682 | a,b,c,k= (int(x) for x in input().split())
if a >= k:
print(a)
elif a+b >= k:
print(a)
elif a+b+c >= k:
print(a - (k-(a+b)))
else:
print(0)
| a,b,c,k= (int(x) for x in input().split())
if a >= k:
print(k)
elif a+b >= k:
print(a)
elif a+b+c >= k:
print(a - (k-(a+b)))
else:
print(0)
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,594 | 408,595 | u402342597 | python |
p02682 | import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readli... | import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readli... | [
"call.remove"
] | 408,605 | 408,606 | u854685063 | python |
p02682 | import sys
a,b,c,k = map(int, input().split())
n_sum = 0
if a >= k:
n_sum += k
print(n_sum)
sys.exit()
else:
n_sum += a
k -= a
k -= b
if k <=0:
print(n_sum)
sys.exit()
if c >= k:
n_sum -= c
print(n_sum)
sys.exit()
else:
n_sum -= k
print(n_sum)
sys.exit() | import sys
a,b,c,k = map(int, input().split())
n_sum = 0
if a >= k:
n_sum += k
print(n_sum)
sys.exit()
else:
n_sum += a
k -= a
k -= b
if k <=0:
print(n_sum)
sys.exit()
if c >= k:
n_sum -= k
print(n_sum)
sys.exit()
else:
n_sum -= c
print(n_sum)
sys.exit() | [
"identifier.change"
] | 408,627 | 408,628 | u543122853 | python |
p02682 | S = list(map(int, input().split()))
Sum = 0
if S[0] > S[3]:
Sum = S[3]
if S[0] + S[1] >= S[3]:
Sum = S[0]
else:
Sum = S[0]*2 - S[3] + S[1]
print(Sum) | S = list(map(int, input().split()))
Sum = 0
if S[0] >= S[3]:
Sum = S[3]
elif S[0] + S[1] >= S[3]:
Sum = S[0]
else:
Sum = S[0]*2 - S[3] + S[1]
print(Sum) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"control_flow.branch.if.replace.remove",
"control_flow.branch.else_if.replace.add"
] | 408,631 | 408,632 | u970497613 | python |
p02682 | S = list(map(int, input().split()))
Sum = 0
if S[0] > S[3]:
Sum = S[0]
elif S[0] + S[1] > S[3]:
Sum = S[0]
else:
Sum = S[0]*2 - S[3] + S[1]
print(Sum) | S = list(map(int, input().split()))
Sum = 0
if S[0] >= S[3]:
Sum = S[3]
elif S[0] + S[1] >= S[3]:
Sum = S[0]
else:
Sum = S[0]*2 - S[3] + S[1]
print(Sum) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"literal.number.integer.change",
"assignment.value.change",
"variable_access.subscript.index.change"
] | 408,633 | 408,632 | u970497613 | python |
p02682 | A, B, C, K = map(int, input().split())
lst = []
sum = 0
if A <= K:
sum += 1 * A
else:
sum += 1 * K
k = K - (A + B)
if (C <= k) and (k > 0):
sum += -1 * C
elif (c > k) and (k > 0):
sum += -1 * k
print(sum) | A, B, C, K = map(int, input().split())
lst = []
sum = 0
if A <= K:
sum += 1 * A
else:
sum += 1 * K
k = K - (A + B)
if (C <= k) and (k > 0):
sum += -1 * C
elif (C > k) and k > 0:
sum += -1 * k
print(sum) | [
"misc.typo",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 408,636 | 408,637 | u774163366 | python |
p02682 | *a, k = map(int, input().split())
print(a, k)
s = 0
b = [1, 0, -1]
for i, j in enumerate(a):
n = min(j, k)
k -= n
s = s + b[i]*n
if k<=0:
break
print(s)
| *a, k = map(int, input().split())
s = 0
b = [1, 0, -1]
for i, j in enumerate(a):
n = min(j, k)
k -= n
s = s + b[i]*n
if k<=0:
break
print(s)
| [
"call.remove"
] | 408,651 | 408,652 | u193582576 | python |
p02682 | l = list(map(lambda x:int(x), input().split(" ")))
a = l[0]
b = l[1]
c = l[2]
k = l[3]
if a >= k:
print(a)
elif a < k:
if b >= k-a:
print(a)
elif b < k-a:
print(a-(k-a-b)) | l = list(map(lambda x:int(x), input().split(" ")))
a = l[0]
b = l[1]
c = l[2]
k = l[3]
if a >= k:
print(k)
elif a < k:
if b >= k-a:
print(a)
elif b < k-a:
print(a-(k-a-b))
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,655 | 408,656 | u507656797 | python |
p02682 | A, B, C, K = list(map(int, input().split()))
if A >= K:
print(A)
elif A + B >= K:
print(A)
else:
print(A - (K - (A + B))) | A, B, C, K = list(map(int, input().split()))
if A >= K:
print(K)
elif A + B >= K:
print(A)
else:
print(A - (K - (A + B))) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,665 | 408,666 | u536781361 | python |
p02682 | s = input().split(" ")
a = int(s[0])
b = int(s[1])
c = int(s[2])
k = int(s[3])
t = 0
if a >= k:
print(a)
else:
t += a
if b >= (k - a):
print(a)
else:
if c <= (k - a -b):
t -= c
else:
t -= (k - a -b)
print(t) | s = input().split(" ")
a = int(s[0])
b = int(s[1])
c = int(s[2])
k = int(s[3])
t = 0
if a >= k:
print(k)
else:
t += a
if b >= (k - a):
print(a)
else:
if c <= (k - a -b):
t -= c
else:
t -= (k - a -b)
print(t) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,670 | 408,671 | u602869478 | python |
p02682 | A, B, C, K = list(map(int,input().split()))
if A >= K:
print(A)
elif A+B>=K and A<K:
print(A)
elif A+B+C>=K and A+B<K:
print(2*A-K+B)
| A, B, C, K = list(map(int,input().split()))
if A >= K:
print(K)
elif A+B>=K and A<K:
print(A)
elif A+B+C>=K and A+B<K:
print(2*A-K+B) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,674 | 408,675 | u305349402 | python |
p02682 | A, B, C, K = map(int, input().split())
if K <= A:
print(A)
elif K <= A + B:
print(A)
else:
print(A - (K - (A + B))) | A, B, C, K = map(int, input().split())
if K <= A:
print(K)
elif K <= A + B:
print(A)
else:
print(A - (K - (A + B))) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,676 | 408,677 | u764401543 | python |
p02682 | def linear(A, B, C, K):
s = 0
if K <= A:
return K
s += A
K -= A
if K <= B:
return s
return s - C
if __name__ == "__main__":
A, B, C, K = map(int, input().split())
print(linear(A, B, C, K))
| def linear(A, B, C, K):
s = 0
if K <= A:
return K
s += A
K -= A
if K <= B:
return s
K -= B
return s - K
if __name__ == "__main__":
A, B, C, K = map(int, input().split())
print(linear(A, B, C, K))
| [
"identifier.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 408,689 | 408,690 | u723444827 | python |
p02682 | A, B, C, K = map(int, input().split())
ans = 0
if A >= K:
ans += A
else: # A < K
if B >= (K - A):
ans += A
else: # B< (K-A)
if C >= (K - A - B):
ans += A - (K-A-B)
else: # C < (K - A - B)
ans += A - C
print(ans)
| A, B, C, K = map(int, input().split())
ans = 0
if A >= K:
ans += K
else: # A < K
if B >= (K - A):
ans += A
else: # B< (K-A)
if C >= (K - A - B):
ans += A - (K-A-B)
else: # C < (K - A - B)
ans += A - C
print(ans)
| [
"identifier.change"
] | 408,691 | 408,692 | u615647623 | python |
p02682 | a, b, c, k = map(int, input().split())
ans = 0
if 0 <= (k - a):
ans += a
k = k - a
if 0 <= (k - b):
k = k - b
if 1 <= k:
ans -= k
else:
k = k - b
if 1 <= k:
ans -= k
else:
ans += k - a
print(ans) | a, b, c, k = map(int, input().split())
ans = 0
if 0 <= (k - a):
ans += a
k = k - a
if 0 <= (k - b):
k = k - b
if 1 <= k:
ans -= k
else:
k = k - b
if 1 <= k:
ans -= k
else:
ans += k
print(ans) | [
"expression.operation.binary.remove"
] | 408,695 | 408,696 | u557750361 | python |
p02682 | def create_union_answer(a, b, c, k):
if a >= k:
return a
if a + b >= k:
return a
# can select type[c] card numbers.
can_c = k - (a + b)
if can_c > c :
can_c = c
return a - can_c
values = input().split()
a = int(values[0])
b = int(values[1])
c = int(values[2])
k = int(va... | def create_union_answer(a, b, c, k):
if a >= k:
return k
if a + b >= k:
return a
# can select type[c] card numbers.
can_c = k - (a + b)
if can_c > c :
can_c = c
return a - can_c
values = input().split()
a = int(values[0])
b = int(values[1])
c = int(values[2])
k = int(va... | [
"identifier.change",
"function.return_value.change"
] | 408,697 | 408,698 | u683391968 | python |
p02682 | def create_union_answer(a, b, c, k):
if a >= k:
return a
if a + b >= k:
return a
# can select type[c] card numbers.
can_c = k - (a + b)
if can_c < 0:
can_c = 0
return a - can_c
values = input().split()
a = int(values[0])
b = int(values[1])
c = int(values[2])
k = int(val... | def create_union_answer(a, b, c, k):
if a >= k:
return k
if a + b >= k:
return a
# can select type[c] card numbers.
can_c = k - (a + b)
if can_c > c :
can_c = c
return a - can_c
values = input().split()
a = int(values[0])
b = int(values[1])
c = int(values[2])
k = int(va... | [
"identifier.change",
"function.return_value.change",
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove"
] | 408,699 | 408,698 | u683391968 | python |
p02682 | a,b,c,d=map(int,input().split())
ans=0
if d-a>0:
d=d-a
ans+=a
if d-b>0:
d-=b
if d-c==0:
ans-=c
else:
ans=ans-d
else:
ans=a-d
print(ans)
| a,b,c,d=map(int,input().split())
ans=0
if d-a>=0:
d=d-a
ans+=a
if d-b>0:
d-=b
if d-c==0:
ans-=c
else:
ans=ans-d
else:
ans+=d
print(ans)
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"assignment.value.change",
"expression.operation.binary.remove"
] | 408,706 | 408,707 | u631579948 | python |
p02682 | A,B,C,K = map(int,input().split())
import sys
ans = 0
ans = A
K = K - A
if K < 0:
ans = ans + K
print(ans)
sys.exit(0)
if K > 0:
K = K - B
print(K)
if K > 0:
ans = ans - K
print(ans) | A,B,C,K = map(int,input().split())
import sys
ans = 0
ans = A
K = K - A
if K < 0:
ans = ans + K
print(ans)
sys.exit(0)
if K > 0:
K = K - B
if K > 0:
ans = ans - K
print(ans) | [
"call.remove"
] | 408,710 | 408,711 | u551066908 | python |
p02682 | A,B,C,K = map(int,input().split())
if A >= K:
print(A)
elif A+B >=K:
print(A)
else:
D = int(K-A-B)
print(A-D) | A,B,C,K = map(int,input().split())
if A > K:
print(K)
elif A+B >= K:
print(A)
else:
D = int(K-A-B)
print(A-D) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,720 | 408,721 | u642829572 | python |
p02682 | a,b,c,k=[int(i) for i in input().split()]
score=0
if k>=a:
score=a
k=k-a
if k>=b:
k=k-b
if k>0:
score-=1
else:
score=k
print(score) | a,b,c,k=[int(i) for i in input().split()]
score=0
if k>=a:
score=a
k=k-a
if k>=b:
k=k-b
if k>0:
score-=k
else:
score=k
print(score) | [
"identifier.replace.add",
"literal.replace.remove"
] | 408,724 | 408,725 | u899374265 | python |
p02682 | A, B, C, K = map(int, input().split())
ans = 0
if A > K:
ans = K
else:
ans += A
K -= A
if B > K:
ans = K
else:
ans += 0
K -= B
ans -= K
print(ans)
| A, B, C, K = map(int, input().split())
ans = 0
if A > K:
ans = K
else:
ans += A
K -= A
if B > K:
ans += 0
else:
ans += 0
K -= B
ans -= K
print(ans)
| [] | 408,726 | 408,727 | u554096168 | python |
p02682 | a,b,c,k=map(int,input().split())
ans
if(a>=k):
ans=k
else:
if((a+b)>=k):
ans=a
else:
x=k-a-b
ans=a-x
print(ans) | a,b,c,k=map(int,input().split())
ans=0
if(a>=k):
ans=k
else:
if((a+b)>=k):
ans=a
else:
x=k-a-b
ans=a-x
print(ans) | [
"assignment.add"
] | 408,728 | 408,729 | u406138190 | python |
p02682 | a,b,c,k=map(int,input().split())
ans=0
if(a>=k):
ans=a
else:
if((a+b)>=k):
ans=a
else:
x=k-a-b
ans=a-x
print(ans) | a,b,c,k=map(int,input().split())
ans=0
if(a>=k):
ans=k
else:
if((a+b)>=k):
ans=a
else:
x=k-a-b
ans=a-x
print(ans) | [
"assignment.value.change",
"identifier.change"
] | 408,730 | 408,729 | u406138190 | python |
p02682 | A,B,C,K = map(int,input().split())
tmp = K
maxSum = 0
i = 0
if(tmp>A):
maxSum+=A
tmp-=A
else:
maxSum+=K
tmp = 0
if(tmp>B):
tmp-=B
else:
tmp = 0
if(tmp>C):
maxSum-=C
tmp-=C
else:
maxSum-=K-A-B
tmp = 0
print(maxSum) | A,B,C,K = map(int,input().split())
tmp = K
maxSum = 0
i = 0
if(tmp>A):
maxSum+=A
tmp-=A
else:
maxSum+=K
tmp = 0
#print(str(tmp) + ' sum = ' + str(maxSum))
if(tmp>B):
tmp-=B
else:
tmp = 0
#print(str(tmp) + ' sum = ' + str(maxSum))
if(tmp>C):
maxSum-=C
tmp-=C
else:
maxSum-=tmp
tmp = 0
#print(str(tm... | [
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 408,737 | 408,738 | u789282627 | python |
p02682 | A,B,C,K = map(int, input().split())
if A >= K:
print(K)
elif A+B >=K:
print(A)
else:
print(A-(A+B-K))
| A,B,C,K = map(int, input().split())
if A >= K:
print(K)
elif A+B >=K:
print(A)
else:
print(A+(A+B-K)) | [
"misc.opposites",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 408,739 | 408,740 | u605161376 | python |
p02682 | A,B,C,K = map(int, input().split())
if A >= K:
print(K)
elif A+B >=K:
print(A)
else:
print(A-1*(A+B-k))
| A,B,C,K = map(int, input().split())
if A >= K:
print(K)
elif A+B >=K:
print(A)
else:
print(A+(A+B-K)) | [
"misc.opposites",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change",
"expression.operation.binary.remove",
"identifier.change"
] | 408,741 | 408,740 | u605161376 | python |
p02682 | # coding: utf-8
import sys
info = input().split(' ')
card_one = int(info[0])
card_zero = int(info[1])
card_minus = int(info[2])
number = int(info[3])
sumnum = 0
if (number >= card_one):
number = number - card_one
sumnum = sumnum + card_one
else:
print(card_one)
sys.exit()
if (number >= card_zero):
... | # coding: utf-8
import sys
info = input().split(' ')
card_one = int(info[0])
card_zero = int(info[1])
card_minus = int(info[2])
number = int(info[3])
sumnum = 0
if (number >= card_one):
number = number - card_one
sumnum = sumnum + card_one
else:
print(number)
sys.exit()
if (number >= card_zero):
... | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,742 | 408,743 | u663632718 | python |
p02682 | a,b,c,k = map(int, input().split())
ans=0
if k-a <= 0:
ans = a
elif k-(a+b) <= 0:
ans = a
else:
ans = a-(k-(a+b))
print(ans) | a,b,c,k = map(int, input().split())
ans=0
if k-a <= 0:
ans = k
elif k-(a+b) <= 0:
ans = a
else:
ans = a-(k-(a+b))
print(ans) | [
"assignment.value.change",
"identifier.change"
] | 408,746 | 408,747 | u051298937 | python |
p02682 | a,b,c,k = map(int, input().split())
ans=0
if k-a <= 0:
ans = a
elif k-a-b <= 0:
ans = a
else:
ans = a-(k-(a+b))
print(ans) | a,b,c,k = map(int, input().split())
ans=0
if k-a <= 0:
ans = k
elif k-(a+b) <= 0:
ans = a
else:
ans = a-(k-(a+b))
print(ans) | [
"assignment.value.change",
"identifier.change",
"control_flow.branch.if.condition.change",
"misc.opposites",
"expression.operator.arithmetic.change"
] | 408,748 | 408,747 | u051298937 | python |
p02682 | A, B, C, K = map(int,input().split())
if A >= K:
print(A)
elif A+B >= K:
print(A)
else:
print(A - min(K - A - B, C)) | A, B, C, K = map(int,input().split())
if A >= K:
print(K)
elif A+B >= K:
print(A)
else:
print(A - min(K - A - B, C)) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,753 | 408,754 | u992541367 | python |
p02682 | A, B, C, K = map(int,input().split())
if A >= K:
print(A)
elif A+B >= K:
print(A)
else:
print(A - (K - A - B)) | A, B, C, K = map(int,input().split())
if A >= K:
print(K)
elif A+B >= K:
print(A)
else:
print(A - min(K - A - B, C)) | [
"identifier.change",
"call.arguments.change",
"io.output.change",
"call.add",
"call.arguments.add"
] | 408,755 | 408,754 | u992541367 | python |
p02682 | #--Easy Linear Programming
a, b, c, k = map(int, input().split())
number = 0
count = 0
if (k <= a):
count = count + a
print(count)
exit()
if (k > a):
number = number + a
count = count + a
kk = k - number
if (kk <= b):
print(count)
exit()
if (kk > b):
number = number + b
kkk = k - ... | #--Easy Linear Programming
a, b, c, k = map(int, input().split())
number = 0
count = 0
if (k <= a):
count = count + k
print(count)
exit()
if (k > a):
number = number + a
count = count + a
kk = k - number
if (kk <= b):
print(count)
exit()
if (kk > b):
number = number + b
kkk = k - ... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 408,788 | 408,789 | u949234226 | python |
p02682 | #--Easy Linear Programming
a, b, c, k = map(int, input().split())
number = 0
count = 0
if (k <= a):
count = count + a
print(count)
exit()
if (k > a):
number = number + a
count = count + a
kk = k - number
if (kk <= b):
print(count)
exit()
if (kk > b):
number = number + b
kkk = k -... | #--Easy Linear Programming
a, b, c, k = map(int, input().split())
number = 0
count = 0
if (k <= a):
count = count + k
print(count)
exit()
if (k > a):
number = number + a
count = count + a
kk = k - number
if (kk <= b):
print(count)
exit()
if (kk > b):
number = number + b
kkk = k - ... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 408,790 | 408,789 | u949234226 | python |
p02682 | a = list(map(int,input().split()))
A = a[0]
B = a[1]
C = a[2]
K = a[3]
if A > K :
print(A)
elif (A + B) > K:
print(A)
else:
print(A-(K-A-B))
| a = list(map(int,input().split()))
A = a[0]
B = a[1]
C = a[2]
K = a[3]
if A > K :
print(K)
elif (A + B) > K:
print(A)
else:
print(A-(K-A-B))
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,791 | 408,792 | u176165272 | python |
p02682 | a = list(map(int,input().split()))
A = a[0]
B = a[1]
C = a[2]
K = a[3]
if A > k :
print(A)
elif (A + B) > K:
print(A)
else:
print(A-(K-A-B)) | a = list(map(int,input().split()))
A = a[0]
B = a[1]
C = a[2]
K = a[3]
if A > K :
print(K)
elif (A + B) > K:
print(A)
else:
print(A-(K-A-B))
| [
"identifier.change",
"control_flow.branch.if.condition.change",
"call.arguments.change",
"io.output.change"
] | 408,793 | 408,792 | u176165272 | python |
p02682 | a, b, c, k = map(int, input().split())
if k <= a:
print(k)
if a < k <= b:
print(a)
if b < k:
d = 2*a + b - k
print(d) | a, b, c, k = map(int, input().split())
if k <= a:
print(k)
if a < k <= a + b:
print(a)
if a + b < k:
d = 2*a + b - k
print(d) | [
"control_flow.branch.if.condition.change"
] | 408,798 | 408,797 | u449580152 | python |
p02682 | A,B,C,K = map(int,input().split())
if A >= K :
print(A)
elif A < K and B >= K - A :
print(A + (K-A)*0 )
elif A < K and B < K - A :
print(A + (K-A)*0 +(K-A-B)*(-1)) | A,B,C,K = map(int,input().split())
if A >= K :
print(K)
elif A < K and B >= K - A :
print(A + (K-A)*0 )
elif A < K and B < K - A :
print(A + (K-A)*0 +(K-A-B)*(-1)) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,799 | 408,800 | u441246928 | python |
p02682 | a, b, c, k = map(int, input().split())
if k <= a + b:
print(k)
exit(0)
print(a - (k - (a + b)))
| a, b, c, k = map(int, input().split())
if k <= a + b:
print(min(a, k))
exit(0)
print(a - (k - (a + b)))
| [
"call.add",
"call.arguments.change"
] | 408,808 | 408,809 | u421815567 | python |
p02682 | a, b, c, k = map(int, input().split())
if k <= a + b:
print(a)
exit(0)
print(a - (k - (a + b)))
| a, b, c, k = map(int, input().split())
if k <= a + b:
print(min(a, k))
exit(0)
print(a - (k - (a + b)))
| [
"call.add",
"call.arguments.add"
] | 408,810 | 408,809 | u421815567 | python |
p02682 | A,B,C,K = map(int,input().split())
if(K <= A+B):
print(A)
else:
M = A+B+C
M = M-K
M = C-M
print(A-M) | A,B,C,K = map(int,input().split())
if(K <= A+B):
print(min(K,A))
else:
M = A+B+C
M = M-K
M = C-M
print(A-M)
| [
"call.add",
"call.arguments.change"
] | 408,813 | 408,814 | u071695942 | python |
p02682 | A,B,C,K=map(int,input().split())
if A>=K:
print (A)
elif K>A and B>=K-A:
print (A)
else:
print (2*A-K+B) | A,B,C,K=map(int,input().split())
if A>=K:
print (K)
elif K>A and B>=K-A:
print (A)
else:
print (2*A-K+B) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,817 | 408,818 | u419658700 | python |
p02682 | import math
def Next(): return input()
def NextInt(): return int(Next())
def NextInts(): return map(int,input().split())
def Nexts(): return map(str,input().split())
def NextIntList(): return list(map(int,input().split()))
def RowInts(n): return [input() for i in range(n)]
a,b,c,k = NextInts()
ans = 0
ans += min(a,k... | import math
def Next(): return input()
def NextInt(): return int(Next())
def NextInts(): return map(int,input().split())
def Nexts(): return map(str,input().split())
def NextIntList(): return list(map(int,input().split()))
def RowInts(n): return [input() for i in range(n)]
a,b,c,k = NextInts()
ans = 0
ans += min(a,k... | [
"call.add",
"call.arguments.change"
] | 408,822 | 408,823 | u057079894 | python |
p02682 | a,b,c,k = map(int, input().split())
count = 0
if k >= a:
k -= a
count += a
else:
count += a
print(count)
exit()
if k == 0:
print(count)
exit()
if k >= b:
k-= b
else:
print(count)
exit()
if k == 0:
print(count)
exit()
count += -1*k
print(count) | a,b,c,k = map(int, input().split())
count = 0
if k >= a:
k -= a
count += a
else:
count += k
print(count)
exit()
if k == 0:
print(count)
exit()
if k >= b:
k-= b
else:
print(count)
exit()
if k == 0:
print(count)
exit()
count += -1*k
print(count) | [
"identifier.change"
] | 408,824 | 408,825 | u395944336 | python |
p02682 | a,b,c,k = map(int, input().split())
count = 0
if k >= a:
k -= a
count += a
else:
count += a*k
print(count)
exit()
if k == 0:
print(count)
exit()
if k >= b:
k-= b
else:
print(count)
exit()
if k == 0:
print(count)
exit()
count += -1*k
print(count) | a,b,c,k = map(int, input().split())
count = 0
if k >= a:
k -= a
count += a
else:
count += k
print(count)
exit()
if k == 0:
print(count)
exit()
if k >= b:
k-= b
else:
print(count)
exit()
if k == 0:
print(count)
exit()
count += -1*k
print(count) | [
"expression.operation.binary.remove"
] | 408,826 | 408,825 | u395944336 | python |
p02682 | A, B, C, K = map(int, input().split())
if A > K:
print(A)
elif A+B > K:
print(A)
else:
print(A-(K-A-B))
| A, B, C, K = map(int, input().split())
if A > K:
print(K)
elif A+B > K:
print(A)
else:
print(A-(K-A-B))
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,829 | 408,830 | u978178314 | python |
p02682 | A, B, C, K = map(int, input().split())
if A < K:
print(A)
elif A+B < K:
print(A)
else:
print(A-(K-A-B)) | A, B, C, K = map(int, input().split())
if A > K:
print(K)
elif A+B > K:
print(A)
else:
print(A-(K-A-B))
| [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,831 | 408,830 | u978178314 | python |
p02682 | A, B, C, K = tuple(int(c) for c in input().split(' '))
if A >= K:
print(A)
exit()
else:
bc = K - A # A < K なのでbc >= 1
assert bc >= 1
if B >= bc:
print(A)
exit()
else:
# B < bc
cc = bc - B
assert cc >= 1
print("{:.0f}".format(A - cc))
exit... | A, B, C, K = tuple(int(c) for c in input().split(' '))
if A >= K:
print(K)
exit()
else:
bc = K - A # A < K なのでbc >= 1
assert bc >= 1
if B >= bc:
print(A)
exit()
else:
# B < bc
cc = bc - B
assert cc >= 1
print("{:.0f}".format(A - cc))
exit... | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,857 | 408,858 | u808817704 | python |
p02682 | A,B,C,K = map(int ,input().split())
if K > A + B:
print(A-(K - A - B))
if K < A:
print(K)
else:
print(A) | A,B,C,K = map(int ,input().split())
if K > A + B:
print(A-(K - A - B))
elif K < A:
print(K)
else:
print(A) | [
"control_flow.branch.if.replace.remove",
"control_flow.branch.else_if.replace.add"
] | 408,861 | 408,862 | u027403702 | python |
p02682 | a,b,c,k= [int(x) for x in input().split()]
if a>k:
ans =k
elif a+b>k and a<k:
ans = a
else:
x=k-a-b
ans = a-x
print(ans) | a,b,c,k= [int(x) for x in input().split()]
if a>=k:
ans = k
elif a+b>k and a<k:
ans = a
else:
x=k-a-b
ans = a-x
print(ans) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,879 | 408,880 | u965669098 | python |
p02682 | a, b, c, k = list(map(int, input().split()))
if k - a <= 0:
print(1 * a)
else:
ans = 1 * a
if k - a - b <= 0:
print(ans)
else:
if k - a - b - c <= 0:
print(ans + (-1 * (k - (a + b))))
else:
print(ans + (-1 * c)) | a, b, c, k = list(map(int, input().split()))
if k - a <= 0:
print(1 * k)
else:
ans = 1 * a
if k - a - b <= 0:
print(ans)
else:
if k - a - b - c <= 0:
print(ans + (-1 * (k - (a + b))))
else:
print(ans + (-1 * c)) | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 408,881 | 408,882 | u555888804 | python |
p02682 | A, B, C, K = map(int, input().split())
if A >= K:
print(A)
elif (A+B) >= K:
print(A)
else:
tmp = K-(A+B)
print(A-tmp)
| A, B, C, K = map(int, input().split())
if A >= K:
print(K)
elif (A+B) >= K:
print(A)
else:
tmp = K-(A+B)
print(A-tmp)
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,883 | 408,884 | u189487046 | python |
p02682 | a, b, c, k = map(int, input().split())
if a >= k:
print(1*a)
elif a < k and b >= k-a:
print (1*a)
else:
print(1*a + 0*b + (k-a-b)*(-1)) | a, b, c, k = map(int, input().split())
if a >= k:
print(1*k)
elif a < k and b >= k-a:
print (1*a)
else:
print(1*a + 0*b + (k-a-b)*(-1)) | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 408,885 | 408,886 | u694402282 | python |
p02682 | a, b, c, k = map(int, input().split())
ans = 0
if a >= k :
ans += k
elif a < k :
ans += a
if b >= (k-a):
ans += 0
elif b < (k-a) :
ans += (b-(k-a))*-1
print(ans) | a, b, c, k = map(int, input().split())
ans = 0
if a >= k :
ans += k
elif a < k :
ans += a
if b >= (k-a):
ans += 0
elif b < (k-a) :
ans += ((k-a)-b)*-1
print(ans) | [
"expression.operation.binary.remove"
] | 408,895 | 408,896 | u408791346 | python |
p02682 | def main():
A, B, C, K = map(int, input().split())
if A >= K:
print(A)
elif A + B >= K:
print(A)
else:
print(A - (K - (A + B)))
if __name__ == "__main__":
main()
| def main():
A, B, C, K = map(int, input().split())
if A >= K:
print(K)
elif A + B >= K:
print(A)
else:
print(A - (K - (A + B)))
if __name__ == "__main__":
main()
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,901 | 408,902 | u577902321 | python |
p02682 |
def main():
A, B, C, K = map(int, input().split())
if A >= K:
print(1 * A)
elif A + B >= K:
print(1 * A)
else:
value = A + (-1 * (K -A -B))
print(value)
if __name__ == '__main__':
main()
|
def main():
A, B, C, K = map(int, input().split())
if K < A:
print(1 * K)
elif A + B >= K:
print(1 * A)
else:
value = A + (-1 * (K -A -B))
print(value)
if __name__ == '__main__':
main()
| [
"control_flow.branch.if.condition.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 408,903 | 408,904 | u476674874 | python |
p02682 | a,b,c,k = map(int, input().split())
if a >= k:
an = k
bn = 0
cn = 0
elif a+b >= k:
an = a
bn = k - (a)
cn = 0
else:
an = a
bn = b
cn = k - (a+b+c)
print(an-cn)
| a,b,c,k = map(int, input().split())
if a >= k:
an = k
bn = 0
cn = 0
elif a+b >= k:
an = a
bn = k - (a)
cn = 0
else:
an = a
bn = b
cn = k - (a+b)
print(an-cn)
| [
"expression.operation.binary.remove"
] | 408,905 | 408,906 | u260248309 | python |
p02682 | a,b,c,k = map(int, input().split())
cnt = 0
if a>=k:
cnt += a
else:
k -= a
cnt += a
if k>0:
k -= b
if k>0:
cnt -= k
print(cnt) | a,b,c,k = map(int, input().split())
cnt = 0
if a>=k:
cnt += k
else:
k -= a
cnt += a
if k>0:
k -= b
if k>0:
cnt -= k
print(cnt) | [
"identifier.change"
] | 408,912 | 408,913 | u677842374 | python |
p02682 | a,b,c,k = map(int, input().split())
cnt = 0
if a>=k:
cnt += a
else:
k -= a
cnt += a
if k!=0:
k -= b
if k!=0:
cnt -= k
print(cnt) | a,b,c,k = map(int, input().split())
cnt = 0
if a>=k:
cnt += k
else:
k -= a
cnt += a
if k>0:
k -= b
if k>0:
cnt -= k
print(cnt) | [
"identifier.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,914 | 408,913 | u677842374 | python |
p02682 | def main():
a,b,c,k = map(int, input().split())
if a >= k:
ans = a
elif a+b >= k:
ans = a
else:
ans = a+k-(a+b)
print(ans)
if __name__ == '__main__':
main()
| def main():
a,b,c,k = map(int, input().split())
if a >= k:
ans = k
elif a+b >= k:
ans = a
else:
ans = a-(k-(a+b))
print(ans)
if __name__ == '__main__':
main()
| [
"assignment.value.change",
"identifier.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 408,915 | 408,916 | u992465933 | python |
p02682 | def main():
a,b,c,k = map(int, input().split())
if a >= k:
ans = k
elif a+b >= k:
ans = a
else:
ans = a+k-(a+b)
print(ans)
if __name__ == '__main__':
main()
| def main():
a,b,c,k = map(int, input().split())
if a >= k:
ans = k
elif a+b >= k:
ans = a
else:
ans = a-(k-(a+b))
print(ans)
if __name__ == '__main__':
main()
| [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 408,917 | 408,916 | u992465933 | python |
p02682 | a, b, c, k = map(int, input().split())
ans = 0
if a >= k:
ans = a
elif a + b >= k:
ans = a
else:
ans = a - (k - (a + b))
print(ans) | a, b, c, k = map(int, input().split())
ans = 0
if a >= k:
ans = k
elif a + b >= k:
ans = a
else:
ans = a - (k - (a + b))
print(ans) | [
"assignment.value.change",
"identifier.change"
] | 408,920 | 408,921 | u979362546 | python |
p02682 | a,b,c,k = map(int, input().split())
if a > k:
print(k)
else:
k -= a + b
if k <= 0:
print(a)
else:
print(a-k) | a,b,c,k = map(int, input().split())
if a >= k:
print(k)
else:
k -= a + b
if k <= 0:
print(a)
else:
print(a-k) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,937 | 408,938 | u617659131 | python |
p02682 | a,b,c,k=map(int,input().split())
if k<=a:
print(a)
elif a<k and k<=a+b:
print(a)
else:
print(2*a+b-k) | a,b,c,k=map(int,input().split())
if k<=a:
print(k)
elif a<k and k<=a+b:
print(a)
else:
print(2*a+b-k) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,939 | 408,940 | u032955959 | python |
p02682 | a ,b ,c ,k = map(int,input().split())
result = 0
if a >= k :
result = a
else:
if a + b >= k :
result = a
else :
result = a - (k - a - b)
print(result) | a ,b ,c ,k = map(int,input().split())
result = 0
if a >= k :
result = k
else:
if a + b >= k :
result = a
else :
result = a - (k - a - b)
print(result) | [
"assignment.value.change",
"identifier.change"
] | 408,946 | 408,947 | u589578850 | python |
p02682 | A, B, C, K = list(map(int,input().split()))
ans = 0
if A >= K:
print(A)
elif A + B >= K:
print(A)
else:
print(A * 2 + B - K) | A, B, C, K = list(map(int,input().split()))
if A >= K:
print(K)
elif A + B >= K:
print(A)
else:
print(A * 2 + B - K) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,955 | 408,956 | u885634168 | python |
p02682 | A=list(map(int,input().split()))
ans = 0
if A[0] >= A[3]:
ans = A[0]
else:
A[3] = A[3]-A[0]
ans = A[0]
A[3] = A[3] -A[1]
if A[3] > 0:
ans = ans - A[3]
print(ans) | A=list(map(int,input().split()))
ans = 0
if A[0] >= A[3]:
ans = A[3]
else:
A[3] = A[3]-A[0]
ans = A[0]
A[3] = A[3] -A[1]
if A[3] > 0:
ans = ans - A[3]
print(ans) | [
"literal.number.integer.change",
"assignment.value.change",
"variable_access.subscript.index.change"
] | 408,957 | 408,958 | u052244548 | python |
p02682 | li = list(map(int, input().split()))
a, b, c, k = li[0], li[1], li[2], li[3]
if a >= k:
print(1*k)
elif (a+b) > k:
print(1*a)
else:
ans = (1*a) - (k-(a-b))
print(ans)
| li = list(map(int, input().split()))
a, b, c, k = li[0], li[1], li[2], li[3]
if a >= k:
print(1*k)
elif (a+b) >= k:
print(1*a)
else:
ans = (1*a) - (k-(a+b))
print(ans)
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 408,959 | 408,960 | u720551456 | python |
p02682 | O=list(map(int, input().split()))
A=O[0]
B=O[1]
C=O[2]
K=O[3]
s= 0
if K <= A:
s = A
elif K<=A+B:
s = A
else:
s = A-(K-A-B)
print(s) | O=list(map(int, input().split()))
A=O[0]
B=O[1]
C=O[2]
K=O[3]
s= 0
if K <= A:
s = K
elif K<=A+B:
s = A
else:
s = A-(K-A-B)
print(s) | [
"assignment.value.change",
"identifier.change"
] | 408,964 | 408,965 | u240256924 | python |
p02682 | from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
fro... | from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
fro... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,966 | 408,967 | u499381410 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.