int main()
{
while(1) {
int dec=0,frac=0;
scanf("%d.%d",&dec,&frac);
long value=(dec*100+frac);
if(value==0) break;
double val;
unsigned long long ways[7001][11];
memset(ways,0,sizeof(ways));
Your previous code was correct except the formatting. The 1e-7 was given for safety, nothing else. Check carefully, you used %17lld but there was a space behind it. So, it was PE.