All Submissions


You are given the value of n. Find the number of solutions to the eqautions x + 2y + 2z = n.
x,y,z can take non-negative integer values only.

Input
The first line contains a single integer T, the number of test cases. T test cases follow each containing a single line conntaining a single integer n.

Output
Output one line for each test case each containing a single number that being the number of solutions to the eqaution.

Constraint
T <= 10000
1 <= N <= 10000

Hint
Work out for a formula. Do not iterate through nested loops.

Sample Input
2
2
3


Sample Output
3
3


Problem Setter : Shikhar Sharad
Problem Tester: Shradha Chhaparia


Languages: Brain,C,C++,Java,C#,JavaScript,Pascal,Perl,PHP,Python,Ruby,Text

Time Limit: 0.5 Second(s)
Score: 100 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0