HHC 2019 will be in Reno, Nevada, Sept 21-22
|
09-23-2019, 01:54 PM
Post: #30
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
My take, nothing clever here, just plain brute force. I had solved this previously, I found this code already in my calc I guess from some old challenge?.
Anyway, the trivial code was also in my calc already and Wes already posted it, so I won't repeat it. I do want to post this other version which splits the digits from a single loop. Is quite straightforward, uses the newRPL-only DIGITS command to extract digits off a number ( <number> <start_digit> <end_digit> DIGITS): Code:
This version runs in 0.097 seconds, while Wes fastest runs in 0.068 seconds. That's when run from within a program, if executed from the keyboard it's 0.556 seconds and 0.531 seconds respectively due to power-saving clock management. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 20 Guest(s)