2009/12/19 David Winsemius <dwinsem...@comcast.net>:
>
> On Dec 19, 2009, at 9:06 AM, baptiste auguie wrote:
>
>> Dear list,
>>
>> In a little numbers game, I've hit a performance snag and I'm not sure
>> how to code this in C.
>>
>> The game is the following: how many 8-digit numbers have the sum of
>> their digits equal to 17?
> And are you considering the number "00000089" to be in the acceptable set?
> Or is the range of possible numbers in 10000079:98000000 ?
>

The latter, the first digit should not be 0. But if you have an
interesting solution for the other case, let me know anyway.

I should also stress that this is only for entertainment and curiosity's sake.

baptiste

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to