Submission #35788168


Source Code Expand

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

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

Submission Info

Submission Time
Task B - Hammer
User arakaki_tokyo
Language PyPy3 (7.3.0)
Score 200
Code Size 211 Byte
Status AC
Exec Time 60 ms
Memory 61920 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 60 ms 61616 KiB
random_02.txt AC 45 ms 61816 KiB
random_03.txt AC 44 ms 61652 KiB
random_04.txt AC 45 ms 61844 KiB
random_05.txt AC 49 ms 61764 KiB
random_06.txt AC 48 ms 61868 KiB
random_07.txt AC 46 ms 61604 KiB
random_08.txt AC 44 ms 61496 KiB
random_09.txt AC 48 ms 61500 KiB
random_10.txt AC 46 ms 61624 KiB
random_11.txt AC 45 ms 61612 KiB
random_12.txt AC 45 ms 61800 KiB
random_13.txt AC 46 ms 61504 KiB
random_14.txt AC 46 ms 61720 KiB
random_15.txt AC 48 ms 61452 KiB
random_16.txt AC 48 ms 61840 KiB
random_17.txt AC 45 ms 61456 KiB
random_18.txt AC 43 ms 61452 KiB
random_19.txt AC 47 ms 61540 KiB
random_20.txt AC 44 ms 61792 KiB
random_21.txt AC 52 ms 61872 KiB
random_22.txt AC 47 ms 61520 KiB
random_23.txt AC 45 ms 61596 KiB
random_24.txt AC 45 ms 61608 KiB
sample_01.txt AC 47 ms 61836 KiB
sample_02.txt AC 52 ms 61920 KiB
sample_03.txt AC 45 ms 61504 KiB