2014
01-05

# Herbert

Herbert is a game in which you control a robot on an infinite two-dimensional grid. There are three commands available to you:

s: Go one square forward in the current direction.

l: Turn ninety degrees counterclockwise.

r: Turn ninety degrees clockwise.
After playing this game for a while, you wonder how many squares you can reach within a certain number of moves. Write a program to calculate the answer to this question.

On the first line an integer t (1 <= t <= 100): the number of test cases. Then for each test case:

One line with an integer n (0 <= n <= 1 000 000 000): the maximum number of moves.

On the first line an integer t (1 <= t <= 100): the number of test cases. Then for each test case:

One line with an integer n (0 <= n <= 1 000 000 000): the maximum number of moves.

4
0
1
2
3

1
2
5
11

1. 我没看懂题目
2
5 6 -1 5 4 -7
7 0 6 -1 1 -6 7 -5
我觉得第一个应该是5 6 -1 5 4 输出是19 5 4
第二个是7 0 6 -1 1 -6 7输出是14 7 7
不知道题目例子是怎么得出来的