-->
当前位置:首页 > 题库

PROGRAMMING:Xi'an distance

Luz5年前 (2021-05-10)题库435
Xiao Ming came to the ancient capital Xi'an, want to visit the western city of Tang Dynasty!
The road in Xi'an can be regarded as a straight line perpendicular to the x-axis or y-axis. Xiaoming is located in (a, b), and the destination is in (C, d). How many steps can you take to get there.
###Input format:
Four integers in a row, a, B, C, D, represent coordinates (a, b) and (C, d), where 0 < = a, B, C, d < = 1000
###Output format:
Output the distance between the two points.
###Input example:
```in
0 0 3 4
```
###Output example:
```out
seven
```






answer:If there is no answer, please comment