BOKAM143SOU - Checking cubes.

Given a integer N. Find number of possible ways to represent N as a sum of at most five cubes.

Input

First line contains N.

1<=N<=125000.

Output

Output the result

Example

Input:
64

Output:
2

Added by:BOKAM VINAY KUMAR
Date:2015-08-22
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 GOSU JS-MONKEY

hide comments
2016-07-10 17:17:23
To all those saying it can b done in ϴ(N^5) , look again at your complexity it's (N^(5/3))
2016-06-13 05:34:06 Piyush Kumar
The constraints and the time limit for this problem make it very trivial. Completely Brute Force method passes in 0.0 seconds!
2015-09-30 18:03:59
Test cases (n answer):
1 1
15436 12
125000 50
905 0
2015-09-15 19:36:54 ROHIT Kumar
can anyone provide some tricky test cases or upload some test cases on spojtoolkit
2015-09-11 19:07:30
Its pretty simple.. Just try it .. ;)

Last edit: 2015-09-11 19:08:26
2015-09-07 14:29:04 KARM
N^5 is OK
2015-08-23 21:11:21
positive integers, they can be the same (64 = { 4 } and { 3, 3, 2, 1, 1 } )
2015-08-23 10:18:16 Pranjal Shankhdhar
The cubes should be of positive integers? Are they distinct or can they be same?

Last edit: 2015-08-23 10:38:05
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.