RPL exercise - Last Digits of Primes (HP 49G, G+, 50g)
|
06-01-2019, 05:02 AM
Post: #4
|
|||
|
|||
RE: RPL exercise - Last Digits of Primes (HP 49G, G+, 50g)
(06-01-2019 04:43 AM)Gerson W. Barbosa Wrote: Yes, 155.4 seconds (base 10), or 155.4 ms per prime, but that’s not linear. For 100 primes it takes 7.38 seconds or about 13.5 primes per second. Anyway, that’s an improvement over my first attempt. Hopefully there’s still a better way. Here's a fairly brute-force method: Code: \<< The result for an input of 1000. is { 245. 253. 256. 246. }, and on my 50g takes about 41s to complete. Note that I'm using approximate numbers here instead of exact to shorten the time a bit. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)