BOKAM143SOU - Checking cubes.

no tags 

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

hide comments
iloveaakanksha: 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))

Piyush Kumar: 2016-06-13 05:34:06

The constraints and the time limit for this problem make it very trivial. Completely Brute Force method passes in 0.0 seconds!

hodobox: 2015-09-30 18:03:59

Test cases (n answer):
1 1
15436 12
125000 50
905 0

ROHIT Kumar: 2015-09-15 19:36:54

can anyone provide some tricky test cases or upload some test cases on spojtoolkit

dwij28: 2015-09-11 19:07:30

Its pretty simple.. Just try it .. ;)

Last edit: 2015-09-11 19:08:26
KARM: 2015-09-07 14:29:04

N^5 is OK

hodobox: 2015-08-23 21:11:21

positive integers, they can be the same (64 = { 4 } and { 3, 3, 2, 1, 1 } )

Pranjal Shankhdhar: 2015-08-23 10:18:16

The cubes should be of positive integers? Are they distinct or can they be same?

Last edit: 2015-08-23 10:38:05

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