結果
| 問題 | No.131 マンハッタン距離 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-10-05 14:38:08 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 20 ms / 5,000 ms |
| + 701µs | |
| コード長 | 220 bytes |
| 記録 | |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-09-14 18:13:23 |
| 合計ジャッジ時間 | 2,108 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
x, y, d = map(int, input().split())
ans = 0
if max(x, y) >= d:
if min(x, y) >= d:
ans = d + 1
else:
ans = min(x, y) + 1
if ans == 0:
if x + y >= d:
ans = x + y - d + 1
print(ans)