codeflash-internal/experiments/pie_test_set/p02682.py

14 lines
203 B
Python

def problem_p02682(input_data):
A, B, C, K = list(map(int, input_data.split()))
if A >= K:
return K
elif A + B >= K:
return A
else:
return A - (K - (A + B))