RPL exercise  Last Digits of Primes (HP 49G, G+, 50g)

06012019, 03:29 PM
Post: #12




RE: RPL exercise  Last Digits of Primes (HP 49G, G+, 50g)
(06012019 02:38 PM)Valentin Albillo Wrote:(06012019 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. (06012019 02:38 PM)Valentin Albillo Wrote: I'd post one line of trivial HP71B 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 builtin (not sure about the HP71B or its Math ROM). Best regards, Gerson. 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)