HHC 2015 RPN programming Contest is now open
|
10-07-2015, 12:41 AM
(This post was last modified: 10-07-2015 12:44 AM by Sylvain Cote.)
Post: #95
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
It took me 6 versions (between 40 and 45 bytes) before being able to come up with a version under 40 bytes.
Code: CAT"1 Code: BB LL Code Comment Resources ... Regs.: 1 to 5 with values sets before running this program Flags: 1 to 5 and need to be cleared before running this program Prog.: 38 Bytes Comments: 1) there is only two valid values 1234 and 2345 2) the flags 1 to 5 are set based on the values (1 to 5) found. I used flags to remove duplicates and the needed for sorting 3) because a sequence of four is a winner, if flag 5 is set, then I set the flag 1 and only the first four flags (1 to 4) is validated Edit: Arrrg, I forgot the value 6, I will correct it and come back |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)