[VA] HP-71B Mini-challenge: Qualifying for a job
|
09-15-2022, 08:05 AM
(This post was last modified: 09-15-2022 10:12 AM by C.Ret.)
Post: #9
|
|||
|
|||
RE: [VA] HP-71B Mini-challenge: Qualifying for a job
(09-15-2022 07:39 AM)J-F Garnier Wrote: Actually, I have a 87-byte solution that passes Valentin's test cases, but may crash for bad inputs so is quite bad programming :-) We must have very close solutions. My code certainly has the same type of defect. If an incorrect value is used, it leads to an "Insufficient Memory" error despite my machine's 64K RAM module. In the meantime, I found a way to save two more bytes. But that doesn't correct the main flaw. >CAT -> workfile BASIC 86 09/15/22 10:48 >LIST -> ▓▒▓▓▓▒▓▓▓▓▓▒▓▒▓▓▓▒▓▓▓▒▓▒▓▓▓▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▓▒▓▓▓▒▓▓▓▓▓▓▒▓▒▓▓▒▓▒▓▓▓▓▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ -> ▓▒▓▓▓▒▓▓▓▒▓▒▓▓▓▒▓▓▓▓▓▓▓▓▓▓▓▓ Oops! LCD display failure; just to give everyone around the world a little more time to solve this new amazing Valentine's challenge EDIT: Surprisingly, fixing the defect leads to a version that is 75 bytes. I expected three more than 86. In any case well below the threshold! I now have a one-liner >CAT -> workfile BASIC 75 09/15/22 11:00 >LIST -> 1▒▓▓▓▒▓▓▓▓▓▒▓▒▓▓▓▒▓▓▓▒▓▒▓▓▓▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▓▒▓▓▓▒▓▓▓▓▓▓▓▓▓▓▓▓▒▓▒▓▓▓▒▓▓▓▓▓▓▒▓▒▓▓▒▓▓▓(▓)▒▓▓▓▓▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ EDIT2: I didn't use any instructions from the inserted modules of my machine. On the other hand, this code is not editable (line too long) and must be placed at the very end of the program which will use these functions at the risk of not working correctly because something terminal is missing. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)