結果
問題 |
No.131 マンハッタン距離
|
ユーザー |
|
提出日時 | 2023-06-25 18:46:36 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 34 ms / 5,000 ms |
コード長 | 204 bytes |
コンパイル時間 | 154 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-07-02 14:00:02 |
合計ジャッジ時間 | 2,084 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
x, y, d = map(int, input().split()) if x > y: x, y = y, x if x >= d and y >= d: print(d + 1) elif x < d and y >= d: print(x + 1) elif x + y >= d: print(x + y - d + 1) else: print(0)