#include <bits/stdc++.h>
using namespace std;
//long long coin[]={1,8,27,64.125,216,343,512,729,1000,1331,1728,2197,2744,3375,4096,4913,5832,6859,8000,9261};
long long coin[]= {9261,8000,6859,5832,4913,4096,3375,2744,2197,1728,1331,1000,729,512,343,216,125,64,27,8,1};
long long ar[10010],mx=10010;
void chk()
{
long long i,j;
ar[0]=1;
for(i=0; i<21; i++)
{
for(j=coin[i]; j<mx; j++)
{
ar[j]+=ar[j-coin[i]];
}
}
}
main()
{
chk();
long long n;
while(scanf("%lld",&n)!=EOF)
{
printf("%lld\n",ar[n]);
}
}
using namespace std;
//long long coin[]={1,8,27,64.125,216,343,512,729,1000,1331,1728,2197,2744,3375,4096,4913,5832,6859,8000,9261};
long long coin[]= {9261,8000,6859,5832,4913,4096,3375,2744,2197,1728,1331,1000,729,512,343,216,125,64,27,8,1};
long long ar[10010],mx=10010;
void chk()
{
long long i,j;
ar[0]=1;
for(i=0; i<21; i++)
{
for(j=coin[i]; j<mx; j++)
{
ar[j]+=ar[j-coin[i]];
}
}
}
main()
{
chk();
long long n;
while(scanf("%lld",&n)!=EOF)
{
printf("%lld\n",ar[n]);
}
}
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন