RPL exercise - Last Digits of Primes (HP 49G, G+, 50g)
|
06-01-2019, 03:29 PM
Post: #12
|
|||
|
|||
RE: RPL exercise - Last Digits of Primes (HP 49G, G+, 50g)
(06-01-2019 02:38 PM)Valentin Albillo Wrote:(06-01-2019 08:51 AM)Carsen Wrote: Here's my take on the challenge. The algorithm is very straightforward. Get the next prime number, put it in a string, retrieve the last digit in the string [...] I had tried MOD 10 too, especially because it would reduce the byte count, but for a reason I can't explain the running time changed from 155.4 seconds to 1677.1 seconds. (06-01-2019 02:38 PM)Valentin Albillo Wrote: I'd post one line of trivial HP-71B code using that approach but this challenge is for RPL machines and I don't want to intrude. Please do it if you wish, that's no intrusion. I mentioned RPL and those particular models because they have ISPRIME built-in (not sure about the HP-71B or its Math ROM). Best regards, Gerson. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)