correction in Lucifier code :-
if (N > 1)
{
int iter = 0;
int totalCount = 10; // this is when N = 1 ...
for (int i=0; i <= 9; ++i) // earlier for (int i=0; i *<* 9; ++i)
A[i] = 1;
while(++iter < N)
{
for (int i = 8; i > 0 ; --i)
{
A[i]+= A[i+1]; // earlier A[i]+= A*[i-1]** *
totalCount +=A[i];
}
totalCount+=1;
}
printf("%d", totalCount);
}
else
printf("%d", N==1 ? 10 : 0);
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.