Submission #35102232


Source Code Expand

X, Y, Z = map(int, input().split())

if abs(X) < abs(Y):
    print(abs(X))
elif (X>=0 and Y<=0) or (X<=0 and Y>=0):
    print(abs(X))
else:
    if (Y>=0 and Z<=0) or (Y<=0 and Z>=0):
        print(2*abs(Z)+abs(X))
    else:
        if abs(Z)<=abs(Y):
            print(abs(X))
        else:
            print(-1)

Submission Info

Submission Time
Task B - Hammer
User Meerkat
Language Python (3.8.2)
Score 200
Code Size 325 Byte
Status AC
Exec Time 25 ms
Memory 9112 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 27
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, random_21.txt, random_22.txt, random_23.txt, random_24.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
random_01.txt AC 20 ms 8976 KiB
random_02.txt AC 18 ms 8988 KiB
random_03.txt AC 22 ms 8992 KiB
random_04.txt AC 20 ms 8844 KiB
random_05.txt AC 20 ms 9080 KiB
random_06.txt AC 24 ms 8844 KiB
random_07.txt AC 19 ms 8996 KiB
random_08.txt AC 18 ms 8836 KiB
random_09.txt AC 18 ms 9032 KiB
random_10.txt AC 21 ms 9008 KiB
random_11.txt AC 19 ms 8836 KiB
random_12.txt AC 24 ms 8988 KiB
random_13.txt AC 19 ms 9024 KiB
random_14.txt AC 18 ms 9112 KiB
random_15.txt AC 25 ms 8960 KiB
random_16.txt AC 20 ms 8968 KiB
random_17.txt AC 19 ms 8968 KiB
random_18.txt AC 19 ms 8844 KiB
random_19.txt AC 21 ms 8840 KiB
random_20.txt AC 25 ms 8936 KiB
random_21.txt AC 21 ms 9108 KiB
random_22.txt AC 18 ms 8992 KiB
random_23.txt AC 20 ms 9080 KiB
random_24.txt AC 19 ms 8988 KiB
sample_01.txt AC 23 ms 9028 KiB
sample_02.txt AC 23 ms 8936 KiB
sample_03.txt AC 20 ms 9108 KiB