Divide the number
Basic Accuracy: 30.07% Submissions: 535 Points: 1

Given a positive integer N, count the number of possible ways to represent N as sum of four positive integers.

Input
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. 
The first line of each test case contains a positve integer N.

Output
Print out the number of ways to divide N in four parts.

Constraints
1 <= T <= 100
0 <= N <= 300

Examples 

Input
3
5
41

Output
1
511

Explanation

Output 1:  There is only one way to divide 5  (1, 1, 1, 2)

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.