Steve  Flavel



On 28/10/2005, at 10:26 AM, Mark Wieder wrote:

Alex-

Nice. And that elapsed time is amazing. If I'm reading the statistics
properly, your program performed 208 divisions out of 229 trials, so
21 attempts were rejected due to repeated digits. And 773 attempts
were rejected because they contained 0, 4, or 5.

But did you really mean


            if c is in char i+1 to -i of tNum then


Alex

My solution looked at all the permutations and took around 900 ms

One suggestion to improve your very elegant solution

  --repeat while  tNum mod c <>0
        subtract tNum mod c from tNum
        --end repeat

No need for the repeat loop. With this refinement I get it in around 12 ms

Steve Flavel
--
-Mark Wieder
 [EMAIL PROTECTED]

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution




_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to