結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 60 ms
71,344 KB
testcase_02 WA -
testcase_03 AC 59 ms
71,272 KB
testcase_04 AC 61 ms
71,372 KB
testcase_05 AC 63 ms
71,180 KB
testcase_06 AC 61 ms
71,348 KB
testcase_07 AC 62 ms
71,568 KB
testcase_08 AC 64 ms
71,364 KB
testcase_09 AC 63 ms
71,496 KB
testcase_10 AC 62 ms
71,232 KB
testcase_11 AC 61 ms
71,244 KB
testcase_12 WA -
testcase_13 AC 62 ms
71,208 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 63 ms
71,216 KB
testcase_18 AC 59 ms
71,156 KB
testcase_19 AC 61 ms
71,208 KB
testcase_20 WA -
testcase_21 AC 61 ms
71,436 KB
testcase_22 AC 60 ms
71,556 KB
testcase_23 AC 61 ms
71,300 KB
testcase_24 AC 59 ms
71,536 KB
testcase_25 AC 60 ms
71,288 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

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-b)+a)
0