111292024-07-07 13:02:11probaMicimackó (40 pont)python3Accepted 40/4018ms3180 KiB
tav =[int(i) for i in input().split(' ')]
csupor =[int(i) for i in input().split(' ')]

cs = csupor[0]
for i in range(tav[0]):
    cs += -1 if cs > 0 else 0
cs += csupor[1]
for i in range(tav[1]-tav[0]):
    cs -= 1 if cs > 0 else 0
print(cs)
    
SubtaskSumTestVerdictTimeMemory
base40/40
1Accepted0/018ms3056 KiB
2Accepted0/017ms2960 KiB
3Accepted2/217ms2916 KiB
4Accepted2/217ms2980 KiB
5Accepted2/217ms2916 KiB
6Accepted2/217ms3064 KiB
7Accepted2/217ms3064 KiB
8Accepted2/217ms2916 KiB
9Accepted2/217ms2864 KiB
10Accepted2/217ms2916 KiB
11Accepted2/217ms3180 KiB
12Accepted2/217ms2916 KiB
13Accepted2/217ms2860 KiB
14Accepted2/217ms2916 KiB
15Accepted2/217ms2936 KiB
16Accepted2/217ms3064 KiB
17Accepted2/217ms3064 KiB
18Accepted2/217ms3012 KiB
19Accepted2/217ms2916 KiB
20Accepted2/217ms3064 KiB
21Accepted2/217ms3064 KiB
22Accepted2/217ms3064 KiB