Sticks and Right Triangle

Time Limit: 4000ms
Memory Limit: 65536KB
This problem will be judged on HDU. Original ID: 3939
64-bit integer IO format: %I64d      Java class name: Main

Description

We have a stick with infinite length. Now we want to cut 3 sub-sticks with length x, y, z which is not large than L to form a right triangle. With unknown reasons we assume that x, y, z are all integers and satisfy that x, y, z are all co-primed each other. We want to know how many right triangles are there exist under our constraints

Input

The first line of input is an integer T (T<=5) indicating the number of test cases.
Each case contains a single integer L (L<=1,000,000,000,000).

Output

For each test case output a single integer in one line, indicating the number of right triangles.

Sample Input

1
5

Sample Output

1

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .