#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll arr[10009];
int main()
{
ll i,j,k,l,m,n;
memset(arr,0,sizeof(arr));
arr[0]=1;
for(i=1;i<=21;i++)
{
for(j=i*i*i;j<=10009;j++)
{
arr[j]=arr[j]+arr[j-(i*i*i)];
}
}
while(cin>>n)
{
cout<<arr[n]<<endl;
}
return 0;
}
using namespace std;
typedef long long ll;
ll arr[10009];
int main()
{
ll i,j,k,l,m,n;
memset(arr,0,sizeof(arr));
arr[0]=1;
for(i=1;i<=21;i++)
{
for(j=i*i*i;j<=10009;j++)
{
arr[j]=arr[j]+arr[j-(i*i*i)];
}
}
while(cin>>n)
{
cout<<arr[n]<<endl;
}
return 0;
}
No comments:
Post a Comment