当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1391:Number Steps

题目描述
Starting from point (0,0) on a plane, we have written all non-negative integers 0, 1, 2,... as shown in the figure. For example, 1, 2, and 3 has been written at points (1,1), (2,0), and (3, 1) respectively and this pattern has continued.



You are to write a program that reads the coordinates of a point (x, y), and writes the number (if any) that has been written at that point. (x, y) coordinates in the input are in the range 0...5000.
输入解释
The first line of the input is N, the number of test cases for this problem. In each of the N following lines, there is x, and y representing the coordinates (x, y) of a point.
输出解释
For each point in the input, write the number written at that point or write No Number if there is none.
输入样例
3
4 2
6 6
3 4
输出样例
6
12
No Number
来自杭电HDUOJ的附加信息
Recommend Ignatius.L

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-1391

最后修改于 2020-10-25T22:44:32+00:00 由爬虫自动更新

共提交 197

通过率 76.65%
时间上限 内存上限
2000/1000MS(Java/Others) 65536/32768K(Java/Others)