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 | #!/usr/bin/env python3
import sys
def solve(A: int, B: int, C: int, K: int):
if K <= A+B:
print(A)
else:
print(A - (K - (A+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 cust... | #!/usr/bin/env python3
import sys
def solve(A: int, B: int, C: int, K: int):
if K <= A+B:
print(min(A,K))
else:
print(A - (K - (A+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 yo... | [
"call.add",
"call.arguments.add"
] | 407,815 | 407,816 | u544587633 | python |
p02682 | #!/usr/bin/env python3
import sys
def solve(A: int, B: int, C: int, K: int):
if K < A+B:
print(A)
else:
print(A - (K - (A+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 custo... | #!/usr/bin/env python3
import sys
def solve(A: int, B: int, C: int, K: int):
if K <= A+B:
print(min(A,K))
else:
print(A - (K - (A+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 yo... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"call.add",
"call.arguments.add"
] | 407,817 | 407,816 | u544587633 | python |
p02682 | S = list(map(int,input().split()))
if S[0] + S[1] + S[2] >= 2 * 10 ** 9:
print('Error')
elif S[0] >= S[3]:
print(S[3])
elif S[3] > S[0] and S[3] <= S[0] + S[1]:
print(S[0])
elif S[3] > S[0] + S[1] and S[3] <= S[0] + S[1] + S[2]:
print(-1 * (S[3] - S[0] - S[1]) + S[0])
else:
print('Error') | S = list(map(int,input().split()))
if S[0] + S[1] + S[2] > 2 * 10 ** 9:
print('Error')
elif S[0] >= S[3]:
print(S[3])
elif S[3] > S[0] and S[3] <= S[0] + S[1]:
print(S[0])
elif S[3] > S[0] + S[1] and S[3] <= S[0] + S[1] + S[2]:
print(-1 * (S[3] - S[0] - S[1]) + S[0])
else:
print('Error') | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 407,823 | 407,824 | u242890210 | python |
p02682 | S = list(map(int,input().split()))
if S[0] + S[1] + S[2] >= 2 * 10 ** 9:
print('Error')
elif S[0] >= S[3]:
print(S[3])
elif S[3] > S[0] and S[3] < S[0] + S[1]:
print(S[0])
elif S[3] > S[0] + S[1] and S[3] <= S[0] + S[1] + S[2]:
print(-1 * (S[3] - S[0] - S[1]) + S[0])
else:
print('Error')
| S = list(map(int,input().split()))
if S[0] + S[1] + S[2] > 2 * 10 ** 9:
print('Error')
elif S[0] >= S[3]:
print(S[3])
elif S[3] > S[0] and S[3] <= S[0] + S[1]:
print(S[0])
elif S[3] > S[0] + S[1] and S[3] <= S[0] + S[1] + S[2]:
print(-1 * (S[3] - S[0] - S[1]) + S[0])
else:
print('Error') | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 407,825 | 407,824 | u242890210 | python |
p02682 | S = list(map(int,input().split()))
if S[0] + S[1] + S[2] >= 2 * 10 ** 9:
print('Error')
elif S[0] >= S[3]:
print(S[3])
elif S[3] > S[0] and S[3] < S[0] + S[1]:
print(S[0])
elif S[3] > S[0] + S[1] and S[3] <= S[0] + S[1] + S[2]:
print(-1 * (S[3] - S[0] - S[1]) + S[0])
else:
print('Error') | S = list(map(int,input().split()))
if S[0] + S[1] + S[2] > 2 * 10 ** 9:
print('Error')
elif S[0] >= S[3]:
print(S[3])
elif S[3] > S[0] and S[3] <= S[0] + S[1]:
print(S[0])
elif S[3] > S[0] + S[1] and S[3] <= S[0] + S[1] + S[2]:
print(-1 * (S[3] - S[0] - S[1]) + S[0])
else:
print('Error') | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 407,826 | 407,824 | u242890210 | python |
p02682 | a, b, c, k = map( int, input().split() )
if k <= a:
print( k )
elif k > a:
if b == 0:
nc = k - a
print( a - nc )
elif b != 0:
nb = k - a
if nb <= b:
print( a )
elif nb > b:
nc = nb - c
print( a - nc )
| a, b, c, k = map( int, input().split() )
if k <= a:
print( k )
elif k > a:
if b == 0:
nc = k - a
print( a - nc )
elif b != 0:
nb = k - a
if nb <= b:
print( a )
elif nb > b:
nc = nb - b
print( a - nc )
| [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 407,832 | 407,833 | u935241425 | python |
p02682 | a, b, c, k = map( int, input().split() )
if k <= a:
print( a )
elif k > a:
if b == 0:
nc = k - a
print( a - nc )
elif b != 0:
nb = k - a
if nb <= b:
print( a )
elif nb > b:
nc = nb - c
print( a - nc )
| a, b, c, k = map( int, input().split() )
if k <= a:
print( k )
elif k > a:
if b == 0:
nc = k - a
print( a - nc )
elif b != 0:
nb = k - a
if nb <= b:
print( a )
elif nb > b:
nc = nb - b
print( a - nc )
| [
"identifier.change",
"call.arguments.change",
"io.output.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 407,834 | 407,833 | u935241425 | python |
p02682 | def solve():
a, b, c, k = map(int,input().split())
if k > a + b:
ans = a - (k - a - b)
print(ans)
else:
print(a)
if __name__ == '__main__':
solve()
| def solve():
a, b, c, k = map(int, input().split())
if k > a + b:
ans = a - (k - a - b)
print(ans)
else:
print(min(k, a))
if __name__ == '__main__':
solve()
| [
"call.add",
"call.arguments.change"
] | 407,846 | 407,847 | u736443076 | python |
p02682 | [A, B, C, K] = list(map(int, input().split()))
if K <= A:
print(K)
if A< K <= A + B:
print(A)
else:
print(2 * A - K + B)
| [A, B, C, K] = list(map(int, input().split()))
if K <= A:
print(K)
quit()
if A< K <= A + B:
print(A)
quit()
else:
print(2 * A - K + B) | [
"call.add"
] | 407,856 | 407,857 | u817692975 | python |
p02682 | a, b, c, k = map(int, input().split())
if a >= k:
print(a)
else:
if 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"
] | 407,858 | 407,859 | u950825280 | 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"
] | 407,860 | 407,859 | u950825280 | python |
p02682 | a,b,c,k = map(int,input().split())
if a + b >= k:
ans = a
else:
ans = a - (k-a-b)
print(ans) | a,b,c,k = map(int,input().split())
if a + b >= k:
ans = min(a,k)
else:
ans = a - (k-a-b)
print(ans) | [
"call.add",
"call.arguments.add"
] | 407,865 | 407,866 | u677121387 | python |
p02682 | a, b, c, k = map(int, input().split())
if k <= a+b:
print(a)
else:
print(2*a+b-k) | a, b, c, k = map(int, input().split())
if k <= a+b:
print(min(a, k))
else:
print(2*a+b-k) | [
"call.add",
"call.arguments.add"
] | 407,877 | 407,876 | u785573018 | python |
p02682 | 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))) | ans = 0
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"
] | 407,889 | 407,890 | u805552010 | python |
p02682 | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)
a, b, c, k = map(int, readline().split())
if a + b >= k:
print(a)
else:
print(a - (k - a - b))
| import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)
a, b, c, k = map(int, readline().split())
if a + b >= k:
print(min(a, k))
else:
print(a - (k - a - b))
| [
"call.add",
"call.arguments.add"
] | 407,906 | 407,907 | u691018832 | python |
p02682 | a,b,c,k = map(int,input().split())
if a+b >= k:
print(a)
else:
print(a-abs(k-a-b))
| a,b,c,k = map(int,input().split())
if a+b >= k:
print(min(a,k))
else:
print(a-(k-a-b))
| [
"call.add",
"call.arguments.add",
"call.arguments.change"
] | 407,914 | 407,915 | u937782958 | python |
p02682 | a,b,c,k = map(int,input().split())
if a+b >= k:
print(a)
else:
print(a-(k-a-b))
| a,b,c,k = map(int,input().split())
if a+b >= k:
print(min(a,k))
else:
print(a-(k-a-b))
| [
"call.add",
"call.arguments.add"
] | 407,916 | 407,915 | u937782958 | python |
p02682 | s=input().split()
a=int(s[0])
b=int(s[1])
c=int(s[2])
k=int(s[3])
if a+b>=k :
print(a)
else :
print(2*a-k+b)
| s=input().split()
a=int(s[0])
b=int(s[1])
c=int(s[2])
k=int(s[3])
if a+b>=k :
print(min(a,k))
else :
print(2*a-k+b) | [
"call.add",
"call.arguments.add"
] | 407,930 | 407,931 | u876295560 | python |
p02682 | #B
A,B,C,K = map(int,input().split())
if A+B >= K:
print(A)
else:
print(A-(K-(A+B)))
| #B
A,B,C,K = map(int,input().split())
if A+B >= K:
print(min(A,K))
else:
print(A-(K-(A+B)))
| [
"call.add",
"call.arguments.add"
] | 407,932 | 407,933 | u533885955 | python |
p02682 | A,B,C,K=map(int,input().split())
if A>=K:
print(K)
elif (A+B)>=K:
print(A)
else:
print(A-(K-A))
| 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.add"
] | 407,936 | 407,937 | u398203017 | python |
p02682 | A,B,C,K=int(input().split())
if A>=K:
print(K)
elif (A+B)>=K:
print(A)
else:
print(A-(K-A))
| 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))
| [
"assignment.value.change",
"identifier.change",
"call.function.change",
"call.arguments.add"
] | 407,938 | 407,937 | u398203017 | python |
p02682 | a, b, c, k = [int(x) for x in input().split()]
d = k - a
if k <= a:
print(a)
elif b >= d:
print(a)
else:
print(a + (d - b)) | a, b, c, k = [int(x) for x in input().split()]
d = k - a
if k <= a:
print(k)
elif b >= d:
print(a)
else:
print(a - (d - b))
| [
"identifier.change",
"call.arguments.change",
"io.output.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 407,939 | 407,940 | u941223231 | python |
p02682 | a, b, c, k = [int(x) for x in input().split()]
d = k - a
if k <= a:
print(a)
elif b >= d:
print(a)
else:
print(a - (d - b)) | a, b, c, k = [int(x) for x in input().split()]
d = k - a
if k <= a:
print(k)
elif b >= d:
print(a)
else:
print(a - (d - b))
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 407,941 | 407,940 | u941223231 | python |
p02682 | a, b, c, k = [int(x) for x in input().split()]
d = k - a
if k == a:
print(a)
elif b >= d:
print(a)
else:
print(a - (d - b)) | a, b, c, k = [int(x) for x in input().split()]
d = k - a
if k <= a:
print(k)
elif b >= d:
print(a)
else:
print(a - (d - b))
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 407,942 | 407,940 | u941223231 | python |
p02682 | A,B,C,K =map(int,input().split())
if A >= K:
print(A)
elif A + B >= K:
print(A)
elif A + B < K:
c = -1 * (K-(A+B))
#print(c)
#print(A)
cc = A + c
print(cc)
| A,B,C,K =map(int,input().split())
if A >= K:
print(K)
elif A + B >= K:
print(A)
elif A + B < K:
c = -1 * (K-(A+B))
#print(c)
#print(A)
cc = A + c
print(cc)
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 407,947 | 407,948 | u616719454 | python |
p02682 | A,B,C,K =map(int,input().split())
c = 0
if A >= K:
print(A)
elif A + B >= K:
print(A)
elif A + B < K:
c = -1 * (K-(A+B))
#print(c)
#print(A)
cc = A + c
print(cc)
| A,B,C,K =map(int,input().split())
if A >= K:
print(K)
elif A + B >= K:
print(A)
elif A + B < K:
c = -1 * (K-(A+B))
#print(c)
#print(A)
cc = A + c
print(cc)
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 407,949 | 407,948 | u616719454 | python |
p02682 | a, b, c, k = map(int, input().split())
if k <= (a + b):
print(a)
else:
print(a - min(c, (k - a - b)))
| a, b, c, k = map(int, input().split())
if k <= (a + b):
print(min(a, k))
else:
print(a - min(c, (k - a - b)))
| [
"call.add",
"call.arguments.add"
] | 407,950 | 407,951 | u523130469 | python |
p02682 | from sys import stdin
A,B,C,K=list(map(int,(stdin.readline().strip().split())))
if A>=K:
print(A)
exit()
if (A+B)>=K:
print(A)
exit()
K=K-(A+B)
print(A+(K*-1))
exit() | from sys import stdin
A,B,C,K=list(map(int,(stdin.readline().strip().split())))
if A>=K:
print(K)
exit()
if A+B>=K:
print(A)
exit()
K=K-(A+B)
print(A+(K*-1))
exit() | [
"identifier.change",
"call.arguments.change",
"io.output.change",
"control_flow.branch.if.condition.change"
] | 407,958 | 407,959 | u459419927 | python |
p02682 | from sys import stdin
A,B,C,K=list(map(int,(stdin.readline().strip().split())))
if A>=K:
print(A)
exit()
if A+B>=K:
print(A)
exit()
K=K-(A+B)
print(A+(K*-1))
exit() | from sys import stdin
A,B,C,K=list(map(int,(stdin.readline().strip().split())))
if A>=K:
print(K)
exit()
if A+B>=K:
print(A)
exit()
K=K-(A+B)
print(A+(K*-1))
exit() | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 407,960 | 407,959 | u459419927 | python |
p02682 | a, b, c, k = map(int, input().split())
ans = 0
if k <= a+b:
ans = a
else:
ans = a-(k-a-b)
print(ans) | a, b, c, k = map(int, input().split())
ans = 0
if k <= a+b:
ans = min(a, k)
else:
ans = a-(k-a-b)
print(ans) | [
"call.add",
"call.arguments.add"
] | 407,970 | 407,971 | u306142032 | python |
p02682 | A,B,C,K = map(int, input().split())
D = 0
if K-A-B > 0:
D = K-A-B
if K == A:
ans = A - D
else:
ans = K
print(ans) | A,B,C,K = map(int, input().split())
D = 0
if K-A-B > 0:
D = K-A-B
if K >= A:
ans = A - D
else:
ans = K
print(ans) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 407,982 | 407,983 | u931394483 | python |
p02682 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
a,b,c,k = map(int, input().split())
if a + b >= k:
if a >= k:
print(a)
else:
print(k)
else:
print(a - (k - (a + b))) | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
a,b,c,k = map(int, input().split())
if a + b >= k:
if a <= k:
print(a)
else:
print(k)
else:
print(a - (k - (a + b))) | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,008 | 408,009 | u130492706 | python |
p02682 | A, B, C, K = map(int, input().split())
if K - A <= 0:
print(A)
elif K - A - B <= 0:
print(A)
else:
print(A - (K - (A + B))) | A, B, C, K = map(int, input().split())
if K - A <= 0:
print(K)
elif K - A - B <= 0:
print(A)
else:
print(A - (K - (A + B))) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,013 | 408,014 | u808373096 | python |
p02682 | A, B, C, K = map(int, input().split())
if A >= K:
x = A
else:
if A + B >= K:
x = A
else:
x = 2 * A + B - K
print(x)
| A, B, C, K = map(int, input().split())
if A >= K:
x = K
else:
if A + B >= K:
x = A
else:
x = 2 * A + B - K
print(x)
| [
"assignment.value.change",
"identifier.change"
] | 408,015 | 408,016 | u062754605 | python |
p02682 | a,b,c,k=map(int,input().split())
if k<=a+b:
print(a)
else:
print(a-(k-(a+b))) | a,b,c,k=map(int,input().split())
if k<=a+b:
print(min(k,a))
else:
print(a-(k-(a+b)))
| [
"call.add",
"call.arguments.change"
] | 408,019 | 408,020 | u169138653 | python |
p02682 | a, b, c, k = map(int, input().split())
chk1 = k-a
chk2 = k-a-b
if chk1 <= 0:
ans = a
else:
if chk2 > 0:
ans = a -1*chk2
else:
ans = a
print(ans) | a, b, c, k = map(int, input().split())
chk1 = k-a
chk2 = k-a-b
if chk1 <= 0:
ans = k
else:
if chk2 > 0:
ans = a -1*chk2
else:
ans = a
print(ans) | [
"assignment.value.change",
"identifier.change"
] | 408,023 | 408,024 | u769411997 | python |
p02682 | a, b, c, k = map(int, input().split())
chk1 = k-a
chk2 = k-a-b
if chk1 < 0:
ans = a
else:
if chk2 > 0:
ans = a -1*chk2
else:
ans = a
print(ans) | a, b, c, k = map(int, input().split())
chk1 = k-a
chk2 = k-a-b
if chk1 <= 0:
ans = k
else:
if chk2 > 0:
ans = a -1*chk2
else:
ans = a
print(ans) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"assignment.value.change",
"identifier.change"
] | 408,025 | 408,024 | u769411997 | python |
p02682 | a,b,c,k = map(int,input().split())
aa=a
if k == 0:
print(0)
elif a > k:
print(a-k)
elif a+b >= k:
print(a)
else:
ab = a+b
ans = aa-(k-ab)
print(ans) | a,b,c,k = map(int,input().split())
aa=a
if k == 0:
print(0)
elif a > k:
print(k)
elif a+b >= k:
print(a)
else:
ab = a+b
ans = aa-(k-ab)
print(ans) | [
"expression.operation.binary.remove"
] | 408,026 | 408,027 | u684267998 | python |
p02682 | a,b,c,k = map(int,input().split())
if k == 0:
print(0)
elif a > k:
print(a-k)
elif a+b >= k:
print(a)
else:
ab = a+b
ans = a - (k-ab)
print(ans) | a,b,c,k = map(int,input().split())
aa=a
if k == 0:
print(0)
elif a > k:
print(k)
elif a+b >= k:
print(a)
else:
ab = a+b
ans = aa-(k-ab)
print(ans) | [
"expression.operation.binary.remove",
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 408,028 | 408,027 | u684267998 | python |
p02682 | a,b,c,k=map(int,input().split())
print(2*a+b-k if a+b<k else a) | a,b,c,k=map(int,input().split())
print(2*a+b-k if a+b<k else min(a,k)) | [
"call.add",
"call.arguments.add",
"call.arguments.change"
] | 408,029 | 408,030 | u183509493 | python |
p02682 | a, b, c, k = map(int, input().split())
if a >= k:
print(a)
else:
if k - a - b >= 0:
print(a - k + a)
else:
print(a)
| a, b, c, k = map(int, input().split())
if a >= k:
print(k)
else:
if k - a - b >= 0:
print(a - k + a + b)
else:
print(a)
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,039 | 408,040 | u665038048 | python |
p02682 | a, b, c, k = map(int, input().split())
if a >= k:
print(a)
else:
if k - a - b >= 0:
print(a - k + a + b)
else:
print(a)
| a, b, c, k = map(int, input().split())
if a >= k:
print(k)
else:
if k - a - b >= 0:
print(a - k + a + b)
else:
print(a)
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,041 | 408,040 | u665038048 | python |
p02682 | l = list(map(int,input().split()))
a = l[0]
b = l[1]
c = l[2]
k = l[3]
if (k-a-b) >0:
print(a-1*(k-a-b))
else:
print(a) | l = list(map(int,input().split()))
a = l[0]
b = l[1]
c = l[2]
k = l[3]
if (k-a-b) >0:
print(a-1*(k-a-b))
else:
print(min(a,k)) | [
"call.add",
"call.arguments.add",
"call.arguments.change"
] | 408,049 | 408,050 | u876616721 | python |
p02682 | def main():
A,B,C,K=map(int,input().split())
if K <= (A+B):
print(A)
else:
print(A-(K-A-B))
main() | def main():
A,B,C,K=map(int,input().split())
if K <= (A+B):
print(min(K,A))
else:
print(A-(K-A-B))
main() | [
"call.add",
"call.arguments.change"
] | 408,051 | 408,052 | u114954806 | python |
p02682 | def main():
A,B,C,K=map(int,input().split())
if K == (A+B):
print(A)
else:
print(A-(K-A-B))
main() | def main():
A,B,C,K=map(int,input().split())
if K <= (A+B):
print(min(K,A))
else:
print(A-(K-A-B))
main() | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"call.add",
"call.arguments.change"
] | 408,053 | 408,052 | u114954806 | python |
p02682 | import sys
input = sys.stdin.readline
A,B,C,K=(int(x) for x in input().rstrip('\n').split())
res = A
if A<K:
K-=A
if B<K:
K -= B
res -= K
print(res) | import sys
input = sys.stdin.readline
A,B,C,K=(int(x) for x in input().rstrip('\n').split())
res = A
if A<K:
K-=A
if B<K:
K -= B
res -= K
else:
res =K
print(res)
| [
"assignment.add"
] | 408,067 | 408,068 | u680190333 | python |
p02682 | a,b,c,k=map(int,input().split())
n=0
if (k-a)>=0:
n+=a*1
if (k-a-b)>0:
if(k-a-b-c)>=0:
n-=c*-1
else:
n-=(k-a-b)*1
else:
pass
else:
n+=k*1
print(n) | a,b,c,k=map(int,input().split())
n=0
if (k-a)>=0:
n+=a*1
if (k-a-b)>0:
if(k-a-b-c)>=0:
n-=c*1
else:
n-=(k-a-b)*1
else:
pass
else:
n+=k*1
print(n) | [
"expression.operation.unary.arithmetic.remove"
] | 408,069 | 408,070 | u956547804 | python |
p02682 | A,B,C,K = list(map(int, input().split()))
sum = 0
if A <= K:
sum += A
K -= A
else:
sum += K
K = 0
if B < K:
sum += 0
K -= B
else:
sum += 0
if K > 0:
sum -= K
else:
sum += 0
print(sum) | A,B,C,K = list(map(int, input().split()))
sum = 0
if A <= K:
sum += A
K -= A
else:
sum += K
K = 0
if B < K:
sum += 0
K -= B
else:
sum += 0
K = 0
if K > 0:
sum -= K
else:
sum += 0
print(sum) | [
"assignment.add"
] | 408,071 | 408,072 | u039934639 | python |
p02682 | A, B, C, K = [int(i) for i in input().split(" ")]
N = [A, B, C]
for i in range(len(N)):
K -= N[i]
if K == 0:
if i == 0:
N[i+1] = 0
N[i+2] = 0
elif i == 1:
N[i+1] = 0
break
elif K < 0:
if i == 0:
N[i+1] = 0
N[i+2] = 0... | A, B, C, K = [int(i) for i in input().split(" ")]
N = [A, B, C]
for i in range(len(N)):
K -= N[i]
if K == 0:
if i == 0:
N[i+1] = 0
N[i+2] = 0
elif i == 1:
N[i+1] = 0
break
elif K < 0:
if i == 0:
N[i+1] = 0
N[i+2] = 0... | [
"expression.operation.binary.remove"
] | 408,075 | 408,076 | u731467249 | python |
p02682 | A,B,C,K = map(int,input().split())
if K > A:
if K > A + B:
print(A-(K-A-B))
else:
print(K)
else:
print(A) | A,B,C,K = map(int,input().split())
if K > A:
if K > A + B:
print(A-(K-A-B))
else:
print(A)
else:
print(K) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,104 | 408,105 | u034777138 | python |
p02682 | a, b, c, k = map(int, input().split())
ans = 0
if(k <= a):
print(a)
elif(k <= a + b):
print(a)
else:
ans = k - (a + b)
print(a - ans)
| a, b, c, k = map(int, input().split())
ans = 0
if(k <= a):
print(k)
elif(k <= a + b):
print(a)
else:
ans = k - (a + b)
print(a - ans)
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,115 | 408,116 | u830297276 | python |
p02682 | a,b,c,k=(int(x) for x in input().split())
score=0
if a>=k:
score=k
print(score)
else:
score+=a
k-=a
if b>=k :
print(score)
else:
k-=b
if c>=k and k>0:
score-=c
print(score)
else:
print(score) | a,b,c,k=(int(x) for x in input().split())
score=0
if a>=k:
score=k
print(score)
else:
score+=a
k-=a
if b>=k :
print(score)
else:
k-=b
if c>=k and k>0:
score-=k
print(score)
else:
print(score) | [
"identifier.change"
] | 408,125 | 408,126 | u293436958 | python |
p02682 | a,b,c,k=(int(x) for x in input().split())
score=0
if a>=k:
score=a
print(score)
else:
score+=a
k-=a
if b>=k :
print(score)
else:
k-=b
if c>=k and k>0:
score-=c
print(score)
else:
print(score)
| a,b,c,k=(int(x) for x in input().split())
score=0
if a>=k:
score=k
print(score)
else:
score+=a
k-=a
if b>=k :
print(score)
else:
k-=b
if c>=k and k>0:
score-=k
print(score)
else:
print(score) | [
"assignment.value.change",
"identifier.change"
] | 408,127 | 408,126 | u293436958 | python |
p02682 | A,B,C,K=map(int,input().split())
ans=0
if A<=K:
K-=A
ans=A
if B<=K:
K-=B
if C<=K:
ans-=C
else:
B=K-B
else:
ans=K
print(ans)
| A,B,C,K=map(int,input().split())
ans=0
if A<=K:
K-=A
ans=A
if B<=K:
K-=B
if C<=K:
ans-=C
else:
ans-=K
else:
B=K-B
else:
ans=K
print(ans) | [] | 408,131 | 408,132 | u127288756 | python |
p02682 | A, B, C, K = map(int,input().split())
if K <= A:
print(K)
elif K <= A + B:
print(K)
else:
print(A + C*-1*(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 + -1*(K-A-B)) | [
"identifier.change",
"call.arguments.change",
"io.output.change",
"expression.operation.binary.remove"
] | 408,136 | 408,137 | u465652095 | python |
p02682 | A, B, C, K = map(int,input().split())
if K <= A:
print(K)
elif K <= A+B:
print(A)
else:
print(A + C*-1*(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 + -1*(K-A-B)) | [
"expression.operation.binary.remove"
] | 408,138 | 408,137 | u465652095 | python |
p02682 | A, B, C, K = map(int, input().split())
if A >= K:
print(A)
exit()
ans = A
K -= A
if B >= K:
print(ans)
exit()
K -= B
if C >= K:
print(ans - K)
else:
print(ans - C) | A, B, C, K = map(int, input().split())
if A >= K:
print(K)
exit()
ans = A
K -= A
if B >= K:
print(ans)
exit()
K -= B
if C >= K:
print(ans - K)
else:
print(ans - C) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,139 | 408,140 | u311379832 | python |
p02682 | a,b,c,k = map(int,input().split())
ans = 0
if k<=a:
ans += a
elif k>a and k<=(a+b):
ans += a
elif k>a and 0<=(k-a-b)<c:
ans += a + (k-a-b)*(-1)
elif k>a and (k-a-b)>=c:
ans += a + c*(-1)
print(ans) | a,b,c,k = map(int,input().split())
ans = 0
if k<=a:
ans += k
elif k>a and k<=(a+b):
ans += a
elif k>a and 0<(k-a-b)<c:
ans += a + (k-a-b)*(-1)
elif k>a and (k-a-b)>=c:
ans += a + c*(-1)
print(ans) | [
"identifier.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,146 | 408,147 | u798260206 | python |
p02682 | a,b,c,k=map(int,input().split())
printmin((a-max(k-a-b,0)),k) | a,b,c,k=map(int,input().split())
print(min((a-max(k-a-b,0)),k)) | [
"identifier.change",
"call.function.change",
"io.output.change",
"call.arguments.add",
"call.arguments.change"
] | 408,158 | 408,157 | u879921371 | python |
p02682 | a = list(map(int, input().split()))
n = a[0]
m = a[1]
l = a[2]
k = a[3]
if 0 < k <= n:
print(k)
elif n < k <= n + m:
print(n)
elif n+m <= k < n+m+l:
print(n -1*(k -n -m))
elif n+m+l < k :
print(n - l)
else:
print(0) | a = list(map(int, input().split()))
n = a[0]
m = a[1]
l = a[2]
k = a[3]
if 0 < k <= n:
print(k)
elif n < k <= n + m:
print(n)
elif n+m <= k < n+m+l:
print(n -1*(k -n -m))
elif n+m+l <= k:
print(n - l)
else:
print(0)
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,159 | 408,160 | u071563580 | python |
p02682 | a = list(map(int, input().split()))
n = a[0]
m = a[1]
l = a[2]
k = a[3]
if 0 < k <= n:
print(k)
elif n < k <= n + m:
print(n)
elif n+m <= k < n+m+l:
print(n -1*(k - (n+m)))
elif n+m+l < k :
print(n - l)
else:
print(0) | a = list(map(int, input().split()))
n = a[0]
m = a[1]
l = a[2]
k = a[3]
if 0 < k <= n:
print(k)
elif n < k <= n + m:
print(n)
elif n+m <= k < n+m+l:
print(n -1*(k -n -m))
elif n+m+l <= k:
print(n - l)
else:
print(0)
| [
"call.arguments.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change",
"io.output.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,161 | 408,160 | u071563580 | python |
p02682 | a = list(map(int, input().split()))
n = a[0]
m = a[1]
l = a[2]
k = a[3]
if 0 < k <= n:
print(k)
elif n < k <= n + m:
print(n)
elif n+m <= k < n+m+l:
print(n -1*(k-l))
elif n+m+l < k :
print(n - l)
else:
print(0) | a = list(map(int, input().split()))
n = a[0]
m = a[1]
l = a[2]
k = a[3]
if 0 < k <= n:
print(k)
elif n < k <= n + m:
print(n)
elif n+m <= k < n+m+l:
print(n -1*(k -n -m))
elif n+m+l <= k:
print(n - l)
else:
print(0)
| [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,162 | 408,160 | u071563580 | python |
p02682 | a = list(map(int, input().split()))
n = a[0]
m = a[1]
l = a[2]
k = a[3]
if 0 < k <= n:
print(n)
elif n < k <= n + m:
print(n)
elif n+m <= k < n+m+l:
print(n -1*(k-l))
elif n+m+l < k :
print(n - l)
else:
print(0) | a = list(map(int, input().split()))
n = a[0]
m = a[1]
l = a[2]
k = a[3]
if 0 < k <= n:
print(k)
elif n < k <= n + m:
print(n)
elif n+m <= k < n+m+l:
print(n -1*(k -n -m))
elif n+m+l <= k:
print(n - l)
else:
print(0)
| [
"identifier.change",
"call.arguments.change",
"io.output.change",
"expression.operation.binary.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,163 | 408,160 | u071563580 | python |
p02682 | from sys import stdin
def get_result(data):
A, B, C, K = data
if (A + B) >= K:
return A
else:
return A - (K-(A+B))
if __name__ == '__main__':
data = list(map(int, stdin.readline().rstrip().split(' ')))
result = get_result(data)
print(result)
| from sys import stdin
def get_result(data):
A, B, C, K = data
if (A + B) >= K:
return K if A > K else A
else:
return A - (K-(A+B))
if __name__ == '__main__':
data = list(map(int, stdin.readline().rstrip().split(' ')))
result = get_result(data)
print(result)
| [] | 408,168 | 408,169 | u659302753 | python |
p02682 | #B
A, B, C, K = [int(x) for x in input().split(" ")]
if (K-A) > 0:
if (K-A-B) > 0:
print(A-(K-A-B))
else:
print(A)
else:
print(A) | #B
A, B, C, K = [int(x) for x in input().split(" ")]
if (K-A) > 0:
if (K-A-B) > 0:
print(A-(K-A-B))
else:
print(A)
else:
print(K) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,172 | 408,173 | u670724685 | python |
p02682 | a,b,c,k=map(int,input().split())
s=0
import sys
if k>=a:
k=k-a
s=s+a*1
else:
s=s+k*1
print(s)
sys.exit()
if k>=b:
k=k-b
s=s+b*0
else:
s=s+k*0
print(s)
sys.exit()
if k>=c:
k=k-c
s=s+c*(-1)
else:
s=s+k*(-1)
sys.exit()
print(s)
| a,b,c,k=map(int,input().split())
s=0
import sys
if k>=a:
k=k-a
s=s+a*1
else:
s=s+k*1
print(s)
sys.exit()
if k>=b:
k=k-b
s=s+b*0
else:
s=s+k*0
print(s)
sys.exit()
if k>=c:
k=k-c
s=s+c*(-1)
else:
s=s+k*(-1)
print(s)
sys.exit()
print(s)
| [
"call.add"
] | 408,178 | 408,179 | u005517181 | python |
p02682 | X, Y, Z, K = map(int, input().split())
if X >= K:
print(X)
elif X+Y >= K:
print(X)
elif X+Y+Z >= K:
print(X-(K-X-Y))
| X, Y, Z, K = map(int, input().split())
if X >= K:
print(K)
elif X+Y >= K:
print(X)
elif X+Y+Z >= K:
print(X-(K-X-Y))
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,193 | 408,194 | u715396242 | python |
p02682 | a,b,c,k = map(int, input().split())
x = k - a
if x <= 0:
print(k)
else:
y = x - b
if y <= 0:
print(a)
else:
print(a + ((k - b) * (-1)))
| a,b,c,k = map(int, input().split())
x = k - a
if x <= 0:
print(k)
else:
y = x - b
if y <= 0:
print(a)
else:
print(a + ((k - (a + b)) * (-1)))
| [
"call.arguments.change"
] | 408,200 | 408,201 | u723345499 | python |
p02682 | a,b,c,k = map(int, input().split())
x = k - a
if x <= 0:
print(k)
else:
y = x - b
if y <= 0:
print(a)
else:
print(a + ((c - b) * (-1)))
| a,b,c,k = map(int, input().split())
x = k - a
if x <= 0:
print(k)
else:
y = x - b
if y <= 0:
print(a)
else:
print(a + ((k - (a + b)) * (-1)))
| [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 408,202 | 408,201 | u723345499 | python |
p02682 | a = list(map(int,input().split()))
sum = 0
a_3 = a[3]
a_0 = a[0]
a_1 = a[1]
a_2 = a[2]
if a_3 <= a_0:
print (a_3)
elif a_3 > a_0 and a_3 <= (a_0 + a_1):
print (a_0)
else:
sum = a_0 - (a_2 - a_1)
print(sum) | a = list(map(int,input().split()))
sum = 0
a_3 = a[3]
a_0 = a[0]
a_1 = a[1]
a_2 = a[2]
if a_3 <= a_0:
print (a_3)
elif a_3 > a_0 and a_3 <= (a_0 + a_1):
print (a_0)
else:
sum = a_0 - (a_3 - a_0 - a_1)
print(sum) | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 408,216 | 408,217 | u895993079 | python |
p02682 | A, B, C, K= map(int, input().split())
if K-A<=0:
print(A)
elif K-(A+B)<=0:
print(A)
elif K-(A+B+C)<=0:
print(A-(K-A-B)) | A, B, C, K= map(int, input().split())
if K-A<=0:
print(K)
elif K-(A+B)<=0:
print(A)
elif K-(A+B+C)<=0:
print(A-(K-A-B)) | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,235 | 408,236 | u423282882 | python |
p02682 | import sys
A, B, C, K = map(int, input().split())
ans = 0
if K > A:
ans = ans + A
K = K - A
if K > B:
K = K - B
ans = ans - K
print(ans)
sys.exit()
else:
print(ans)
sys.exit()
else:
print(A)
sys.exit() | import sys
A, B, C, K = map(int, input().split())
ans = 0
if K > A:
ans = ans + A
K = K - A
if K > B:
K = K - B
ans = ans - K
print(ans)
sys.exit()
else:
print(ans)
sys.exit()
else:
print(K)
sys.exit() | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,237 | 408,238 | u321096814 | python |
p02682 | # coding: utf-8
# Your code here!
import sys
A, B, C, K = map(int, input().split())
ans = 0
if K >= A:
ans += A
K = K - A
if K > B:
K = K - B
ans = ans - K
print(ans)
sys.exit()
else:
print(ans)
sys.exit()
else:
print(A)
sys.exit() | import sys
A, B, C, K = map(int, input().split())
ans = 0
if K > A:
ans = ans + A
K = K - A
if K > B:
K = K - B
ans = ans - K
print(ans)
sys.exit()
else:
print(ans)
sys.exit()
else:
print(K)
sys.exit() | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,239 | 408,238 | u321096814 | python |
p02682 | a,b,c,k=map(int,input().split())
if k<a:
print(1*k)
elif a<=k<=a+b:
print(1*a+0*(k-a))
elif a+b<=k<a+b+c:
print(1*a+0*b+(k-a-b)*-1) | a,b,c,k=map(int,input().split())
if k<=a:
print(1*k)
elif a<=k<=a+b:
print(1*a+0*(k-a))
elif a+b<=k<=a+b+c:
print(1*a+0*b+(k-a-b)*-1)
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,240 | 408,241 | u516579758 | python |
p02682 | A = list(map(int, input().split()))
if A[0]>=A[3]:
print(A[0])
else:
if A[0]+A[1]>=A[3]:
print(A[0])
else:
print(A[0]-A[3]+A[0]+A[1]) | A = list(map(int, input().split()))
if A[0]>=A[3]:
print(A[3])
else:
if A[0]+A[1]>=A[3]:
print(A[0])
else:
print(A[0]-A[3]+A[0]+A[1]) | [
"literal.number.integer.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"io.output.change"
] | 408,255 | 408,256 | u995163736 | python |
p02682 | A, B, C, K = list(map(int, input().split()))
if K < A:
print("1: ", K)
elif A <= K <= (A+B):
print(A)
elif (A+B) < K:
print(A - (K - A - B))
| A, B, C, K = list(map(int, input().split()))
if K < A:
print(K)
elif A <= K <= (A+B):
print(A)
elif (A+B) < K:
print(A - (K - A - B))
| [
"call.arguments.change"
] | 408,257 | 408,258 | u334370828 | python |
p02682 | a,b,c,k = map(int,input().split())
k1 = 0
if a >= k:
print(k)
elif a+b >=k:
print(a)
elif a+b+c>k:
k1 = k - (a+b)
print(k1*(-1)+a) | a,b,c,k = map(int,input().split())
k1 = 0
if a >= k:
print(k)
elif a+b >=k:
print(a)
elif a+b+c>=k:
k1 = k - (a+b)
print(k1*(-1)+a) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,259 | 408,260 | u854623825 | python |
p02682 | #!/usr/bin/env python3
def main():
a, b, c, k = map(int, input().split())
ans = a
num = a + b
if k >= a:
print(k)
elif num < k:
ans -= k - num
print(ans)
if __name__ == "__main__":
main()
| #!/usr/bin/env python3
def main():
a, b, c, k = map(int, input().split())
ans = a
num = a + b
if k <= a:
print(int(k))
return
elif num < k:
ans -= k - num
print(ans)
if __name__ == "__main__":
main()
| [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"call.add",
"call.arguments.change",
"control_flow.return.add"
] | 408,273 | 408,274 | u552004554 | python |
p02682 | a, b, c, k = list(map(int, input().split()))
s = 0
if k >= a:
s = a
if (k - a - b) >= 0:
s -= k - a - b
print(s)
| a, b, c, k = list(map(int, input().split()))
s = 0
if k >= a:
s = a
else:
s = k
if (k - a - b) >= 0:
s -= k - a - b
print(s)
| [
"assignment.add"
] | 408,293 | 408,294 | u483748949 | python |
p02682 | a,b,c,k = map(int,input().split())
ans = 0
kk=k-a
for i in range(1):
if kk<0:
ans=a
k=-1
break
else:
ans = a
k=k-a
kk = k-b
if kk<0:
k=-1
break
else:
k=k-b
kk = k-c
if kk<0:
ans=ans-k
elif kk>=0:
ans=ans-c... | a,b,c,k = map(int,input().split())
ans = 0
kk=k-a
for i in range(1):
if kk<0:
ans=k
k=-1
break
else:
ans = a
k=k-a
kk = k-b
if kk<0:
k=-1
break
else:
k=k-b
kk = k-c
if kk<0:
ans=ans-k
elif kk>=0:
ans=ans-c... | [
"assignment.value.change",
"identifier.change"
] | 408,303 | 408,304 | u198085535 | python |
p02682 | line1 = input().split()
a = int(line1[0])
b = int(line1[1])
c = int(line1[2])
k = int(line1[3])
if a >= k:
print(a)
elif a + b >= k:
print(a)
else:
print(a - (k - (a + b)))
| line1 = input().split()
a = int(line1[0])
b = int(line1[1])
c = int(line1[2])
k = int(line1[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,317 | 408,318 | u515647766 | python |
p02682 | A, B, C, K = map(int, input().split())
if K <= A:
print(A)
elif K <= A + B:
print(A)
elif K <= A + B + C:
ans = A - (K - A - B)
print(str(ans))
else:
print(0)
# # https://atcoder.jp/contests/abs/tasks/abc081_b
# N = int(input())
# A = map(int, input().split())
# min_count = 1000000000000
# fo... | A, B, C, K = map(int, input().split())
if K <= A:
print(K)
elif K <= A + B:
print(A)
elif K <= A + B + C:
ans = A - (K - A - B)
print(str(ans))
else:
print(0)
# # https://atcoder.jp/contests/abs/tasks/abc081_b
# N = int(input())
# A = map(int, input().split())
# min_count = 1000000000000
# fo... | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,319 | 408,320 | u581094488 | python |
p02682 | 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-1*(K-A-B)) | 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-1*(K-A-B)) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,323 | 408,324 | u022455086 | python |
p02682 | A,B,C,K= map(int, input().split())
if A >= K:
print(K)
else:
ans = A
if B >= K-A:
print(A)
else:
print(A-(K-(K-A))) | A,B,C,K= map(int, input().split())
if A >= K:
print(K)
#print("a")
else:
ans = A
if B >= K-A:
print(A)
#print("b")
else:
print(A-(K-(A+B)))
#print("c") | [
"expression.operation.binary.remove"
] | 408,325 | 408,326 | u529106146 | python |
p02682 | a,b,c,k = map(int,input().split())
if a<k:
if b<k-a:
print(a-(k-a-b))
else:
print(k)
else:
print(k) | a,b,c,k = map(int,input().split())
if a<k:
if b<k-a:
print(a-(k-a-b))
else:
print(a)
else:
print(k)
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,333 | 408,334 | u785728112 | python |
p02682 | def solve(a, b, c, k):
point = a
more = k - a
if more > 0:
more -= b
if more > 0:
point -= more
print(point)
a, b, c, k = map(int, open(0).read().split())
solve(a, b, c, k)
| def solve(a, b, c, k):
point = min(a, k)
more = k - a
if more > 0:
more -= b
if more > 0:
point -= more
print(point)
a, b, c, k = map(int, open(0).read().split())
solve(a, b, c, k) | [
"call.add",
"call.arguments.add"
] | 408,347 | 408,348 | u827554201 | python |
p02682 | body_1,body_2,body_3,cards=map(int,input().split())
total=0
sa=cards-body_1-body_2
if body_1>=cards:
total=body_1
elif body_1<cards:
if (body_1+body_2)>=cards:
total=body_1
else:
total=body_1-sa
print(total) | body_1,body_2,body_3,cards=map(int,input().split())
total=0
sa=cards-body_1-body_2
if body_1>=cards:
total=cards
elif body_1<cards:
if (body_1+body_2)>=cards:
total=body_1*1
else:
total=body_1-sa
print(total)
| [
"assignment.value.change",
"identifier.change"
] | 408,353 | 408,354 | u436660228 | python |
p02682 | a,b,c,k=map(int,input().split())
if int(a) >= int(k):
print(int(a))
elif int(a + b) >= int(k):
print(int(a))
else:
print(int(a - (k-a-b))) | a,b,c,k=map(int,input().split())
if int(a) >= int(k):
print(int(k))
elif int(a + b) >= int(k):
print(int(a))
else:
print(int(a - (k-a-b)))
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,357 | 408,358 | u329407311 | python |
p02682 | from sys import stdin
A, B, C, K = [int(x) for x in stdin.readline().rstrip().split()]
if K-A == 0:
print(A)
elif K-A > 0:
if K-A-B <= 0:
print(A)
else:
print(int(A+(K-A-B)*-1)) | from sys import stdin
A, B, C, K = [int(x) for x in stdin.readline().rstrip().split()]
if K-A <= 0:
print(K)
elif K-A > 0:
if K-A-B <= 0:
print(A)
else:
print(int(A+(K-A-B)*-1))
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,364 | 408,365 | u948050032 | python |
p02682 | a, b, c, k = map(int, input().split())
if a > k:
a = k
b = 0
c = 0
if a < k and a+b > k:
c = 0
if a+b < k:
c = k - a - b
sum_a = 1 * a
sum_c = -1 * c
print(sum_a + sum_c)
| a, b, c, k = map(int, input().split())
if a >= k:
a = k
b = 0
c = 0
if a < k and a+b >= k:
c = 0
if a+b < k:
c = k - a - b
sum_a = 1 * a
sum_c = -1 * c
print(sum_a + sum_c) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 408,385 | 408,386 | u732832001 | python |
p02682 | A, B, C, K = map(int, input().split())
if K <= A:
print(A)
exit()
else:
K = K - A
if K <= B:
print(A)
exit()
else:
K = K - B
print(A-K)
exit()
| A, B, C, K = map(int, input().split())
if K <= A:
print(K)
exit()
else:
K = K - A
if K <= B:
print(A)
exit()
else:
K = K - B
print(A-K)
exit()
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,387 | 408,388 | u384379887 | python |
p02682 | A, B, C, K = map(int,input().split())
n_a = 0
n_b = 0
n_c = 0
if K > A:
n_a = A
if K-A > B:
n_b = B
n_c = K-A-B
if K-A == 0:
n_b = B
n_c = 0
if K-A < B:
n_b = K-A
n_c = 0
if K == A:
n_a == K
if K < A:
n_a == K
print(n_a+(-1)*n_c) | A, B, C, K = map(int,input().split())
n_a = 0
n_b = 0
n_c = 0
if K > A:
n_a = A
if K-A > B:
n_b = B
n_c = K-A-B
if K-A == B:
n_b = B
n_c = 0
if K-A < B:
n_b = K-A
n_c = 0
if K == A:
n_a = K
if K < A:
n_a = K
print(n_a+(-1)*n_c)
| [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change",
"expression.operation.compare.replace.remove",
"assignment.replace.add",
"misc.typo"
] | 408,401 | 408,402 | u791375270 | python |
p02682 | A,B,C,K=map(int,input().split())
ans=0
if K >= A:
ans+=A
K-=A
A=0
else:
ans=A-K*1
K=0
if K >= B:
K-=B
B=0
else:
K=0
if K >= C:
ans-=C
K-=C
C=0
else:
ans=ans+K*(-1)
C=0
print(ans)
| A,B,C,K=map(int,input().split())
ans=0
if K >= A:
ans+=A
K-=A
A=0
else:
ans=K*1
K=0
if K >= B:
K-=B
B=0
else:
K=0
if K >= C:
ans-=C
K-=C
C=0
else:
ans=ans+K*(-1)
C=0
print(ans) | [
"expression.operation.binary.remove"
] | 408,403 | 408,404 | u770661341 | python |
p02682 | A, B, C, K = map(int, input().split())
if K <= A:
print(K)
elif A < K <= A + B:
print(A)
else:
print(A+B-C) | 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) | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 408,409 | 408,410 | u827306875 | python |
p02682 | A, B, C, K = map(int, input().split())
if K <= A:
print(K)
elif A < K <= A + B:
print(A)
else:
print(A+B-c) | 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) | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 408,411 | 408,410 | u827306875 | python |
p02682 | A, B, C, K = map(int, input().split())
if K <= A:
print(K)
elif A < K <= A + B:
print(A)
else:
print(A+B-C) | 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) | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 408,412 | 408,410 | u827306875 | python |
p02682 | A, B, C, K = map(int, input().split())
P = 0
S = 0
while S==0:
P += A
K -= A
if K < 0:
P = K
break
elif K == 0:
break
K -= B
if K <= 0:
break
P -= C
K -= C
if K <= 0:
P += abs(K)
break
S=1
print(P) | A, B, C, K = map(int, input().split())
P = 0
S = 0
while S==0:
P += A
K -= A
if K < 0:
P -= abs(K)
break
elif K == 0:
break
K -= B
if K <= 0:
break
P -= C
K -= C
if K <= 0:
P += abs(K)
break
S=1
print(P)
| [
"assignment.value.change",
"call.add",
"call.arguments.change"
] | 408,423 | 408,424 | u596163897 | python |
p02682 | abck=list(map(int,input().split()))
a=abck[0]
b=abck[1]
c=abck[2]
k=abck[3]
if a>=k:
print(a)
elif a<k:
if a+b>=k:
print(a)
else:
print(a-(k-a-b))
| abck=list(map(int,input().split()))
a=abck[0]
b=abck[1]
c=abck[2]
k=abck[3]
if a>=k:
print(k)
elif a<k:
if a+b>=k:
print(a)
else:
print(a-(k-a-b))
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,425 | 408,426 | u373858851 | python |
p02682 | abck=list(map(int,input().split()))
a=abck[0]
b=abck[1]
c=abck[2]
k=abck[3]
if a>k:
print(a)
elif a<k:
if a+b>k:
print(a)
else:
print(a-(k-a-b)) | abck=list(map(int,input().split()))
a=abck[0]
b=abck[1]
c=abck[2]
k=abck[3]
if a>=k:
print(k)
elif a<k:
if a+b>=k:
print(a)
else:
print(a-(k-a-b))
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 408,427 | 408,426 | u373858851 | python |
p02682 | a,b,c,k = map(int,input().split())
def function(a,b,c,k):
count =0
if a>=k:
return a
else:
count =a
k =k-a
a=0
if b>=k:
return count
else:
k-=b
b=0
count-=k
return count
print(function(a,b,c,k))
| a,b,c,k = map(int,input().split())
def function(a,b,c,k):
count =0
if a>=k:
return k
else:
count =a
k =k-a
a=0
if b>=k:
return count
else:
k-=b
b=0
count-=k
return count
print(function(a,b,c,k))
| [
"identifier.change",
"function.return_value.change"
] | 408,438 | 408,439 | u603939330 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.