mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
14 lines
203 B
Python
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))
|