11137

#include <iostream>

#define ll long long
using namespace std;

int arr[23]={0,1,8,27,64,125,216,343,512,729,
	1000,1331,1728,2197,2744,3375,4096,4913,5832,
	6859,8000,9261
	};

ll ways[10005];

int main()
{
	for(int j=0;j<10005;j++)
			ways[j]= 0;

	ways[0]=1;

	for(int i=1;i<=21;i++)
	{
		for(int j=arr[i];j<10005;j++)
			ways[j]+=ways[j-arr[i]];

	}

	int n;
	while(cin>>n)
	{
		//cout<<calc(1,n)<<"\n";
		cout<<ways[n]<<"\n";
	}
	return 0;
}

 

Leave a Reply

Your email address will not be published. Required fields are marked *