結果

問題 No.126 2基のエレベータ
ユーザー あかりきあかりき
提出日時 2021-02-13 15:49:32
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 153 bytes
コンパイル時間 594 ms
コンパイル使用メモリ 87,196 KB
実行使用メモリ 71,744 KB
最終ジャッジ日時 2023-09-28 00:16:48
合計ジャッジ時間 3,892 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,140 KB
testcase_01 AC 68 ms
71,048 KB
testcase_02 WA -
testcase_03 AC 67 ms
70,796 KB
testcase_04 AC 67 ms
71,064 KB
testcase_05 AC 67 ms
70,976 KB
testcase_06 AC 66 ms
71,084 KB
testcase_07 AC 65 ms
70,808 KB
testcase_08 AC 67 ms
71,060 KB
testcase_09 AC 68 ms
71,064 KB
testcase_10 AC 67 ms
71,140 KB
testcase_11 AC 66 ms
71,128 KB
testcase_12 AC 69 ms
71,192 KB
testcase_13 AC 68 ms
71,088 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 68 ms
70,964 KB
testcase_17 WA -
testcase_18 AC 71 ms
71,176 KB
testcase_19 AC 68 ms
71,044 KB
testcase_20 WA -
testcase_21 AC 69 ms
71,216 KB
testcase_22 AC 69 ms
71,076 KB
testcase_23 AC 69 ms
71,184 KB
testcase_24 AC 69 ms
70,792 KB
testcase_25 AC 69 ms
71,004 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 68 ms
71,068 KB
testcase_29 AC 69 ms
71,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,s=map(int,input().split())
if abs(a-s)<=abs(b-s):
  print(abs(a-s)+s)
else:
  if a==0:
    print(abs(b-s)+s+1)
  else:
    print(abs(b-s)+abs(a-s)+a)
0