結果
| 問題 | 
                            No.126 2基のエレベータ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2025-02-20 16:55:02 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 433 bytes | 
| コンパイル時間 | 97 ms | 
| コンパイル使用メモリ | 12,032 KB | 
| 実行使用メモリ | 10,496 KB | 
| 最終ジャッジ日時 | 2025-06-12 22:56:02 | 
| 合計ジャッジ時間 | 2,181 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 WA * 1 | 
| other | AC * 12 WA * 15 | 
ソースコード
A, B, S = map(int, input().split())
dist_A = abs(A - S)
dist_B = abs(B - S)
if dist_A < dist_B or (dist_A == dist_B and True):  # Aが優先
    move1 = dist_A  # AがSに来る
    move2 = abs(S - 0)  # Sから0に移動
    total = move1 + move2
else:
    move1 = dist_B  # BがSに来る
    move_B = dist_B + abs(S - 100)  # Bで100に移動
    move_A = abs(100 - 0)  # Aが0に移動
    total = move_B + move_A
print(total)