結果
問題 | No.126 2基のエレベータ |
ユーザー |
👑 ![]() |
提出日時 | 2022-01-10 05:10:12 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 181 bytes |
コンパイル時間 | 215 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 53,428 KB |
最終ジャッジ日時 | 2024-11-14 10:41:26 |
合計ジャッジ時間 | 2,453 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 WA * 5 |
ソースコード
def dist(X,Y): return abs(X-Y) A,B,S=map(int,input().split()) if dist(A,S)<=dist(B,S): print(dist(A,S)+dist(S,0)) else: print(dist(B,S)+dist(S,1)+dist(A,1)+dist(1,0))