117582024-11-09 11:16:35balintMicimackó (40 pont)python3Wrong answer 32/4017ms3144 KiB
def main():
    a, b = map(int, input().split())
    c, d = map(int, input().split())
    if a > c:
        if a + d < d:
            print("0")
        else:
            print(a + d - b)
    else:
        if a + d < d:
            print(c - a)
        else:
            print(c - a + (a + d - b))


main()
SubtaskSumTestVerdictTimeMemory
base32/40
1Accepted0/016ms2872 KiB
2Wrong answer0/016ms2876 KiB
3Accepted2/216ms2872 KiB
4Accepted2/216ms2872 KiB
5Wrong answer0/216ms2872 KiB
6Accepted2/216ms3128 KiB
7Accepted2/216ms2880 KiB
8Accepted2/214ms2872 KiB
9Accepted2/216ms2872 KiB
10Accepted2/216ms2872 KiB
11Accepted2/216ms2940 KiB
12Wrong answer0/216ms3144 KiB
13Accepted2/216ms3004 KiB
14Accepted2/214ms2976 KiB
15Wrong answer0/216ms3088 KiB
16Accepted2/216ms3096 KiB
17Accepted2/217ms2872 KiB
18Accepted2/216ms2860 KiB
19Wrong answer0/216ms2868 KiB
20Accepted2/216ms3060 KiB
21Accepted2/216ms3040 KiB
22Accepted2/216ms2996 KiB