HHC 2015 RPN programming Contest is now open
|
10-03-2015, 03:54 PM
(This post was last modified: 10-03-2015 04:16 PM by Egan Ford.)
Post: #86
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
(10-03-2015 01:19 AM)Allen Wrote: To that end \(6x+1\) makes for an even shorter program. ( by checking 8645, 38285, and 108965). (maps to 7,13,19,5^2,31,37). After I posted my prime-based solution I tried to create other prime and co-prime series, but it didn't get me close to 42 bytes. Dieter's optimization + your series still puts it 7 bytes short: 49 bytes (was 53 with x^2-x+11): Code:
We can shave off a byte by only checking for 1,2,5,6 pairs, then checking 3,4: 48 bytes: Code:
Next possible optimization would be to pre compute series, store checks in registers, loop the checks. That's 3 loops and possibly a GSB. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)