Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
719 B
0
Indexable
Never
Checking cube

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
Sample
Input
4
1
64
905
15436
 
Output
#1 1
#2 2
#3 0
#4 12
 
Giải thích:
+ Cách 1: 64 = 27 + 27 + 8 + 1 + 1
+ Cách 2: 64 = 64 + 0  + 0 + 0 + 0

in
50
88236
48656
13459
11728
36174
30156
4852
20681
30537
86072
90017
117168
37756
64019
100162
43119
11136
13121
10356
78102
101127
82690
81340
62017
34651
124902
29776
82925
100821
3244
124546
38922
119326
123570
22936
103654
70963
36213
113709
69648
76626
79011
84170
119374
66214
36590
71902
4877
109837
51232