BETA

Difficulty Level: Basic

Total Submissions: 2404 Accuracy:

20.97%

Pair cube count
     

Given N, count all ‘a’ and ‘b’ that satisfy the condition a^3 + b^3 = N.

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains integer n.

Output:
Count all 'a' and 'b' that satisfy the above equation.

Constraints:
1<=T<=10^5
1<=n<=10^5

Example:
Input:

2
9
28

Output:
2
2

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Ayush Govil

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.