HHC 2016 RPL Programming Contest (HP-71B)
|
09-25-2016, 08:11 AM
Post: #2
|
|||
|
|||
RE: HHC 2016 RPL Programming Contest (HP-71B)
(09-22-2016 10:58 PM)Valentin Albillo Wrote: ... I've also produced another 50-byte solution (same length) which uses no string variable (S$), just the numeric variables I (for the index) and M (to keep track of the maximum distance). Hi Valentin, As always, your HP-71B solutions are compact, efficient ... and amazing! For your 'nano-challenge' without string variable, may I suggest this way: 1 M=0 @ FOR I=1 TO LEN(DISP$) @ M=MAX(M,I-POS(DISP$,DISP$[I,I])) @ NEXT I @ DISP M To use it, type the string, DON'T press ENTER but RUN: >HIPPOPOTAMUS [RUN, not ENTER !] 3 >pablitoclavounclavito [RUN] 15 J-F |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HHC 2016 RPL Programming Contest (HP-71B) - Valentin Albillo - 09-22-2016, 10:58 PM
RE: HHC 2016 RPL Programming Contest (HP-71B) - J-F Garnier - 09-25-2016 08:11 AM
RE: HHC 2016 RPL Programming Contest (HP-71B) - Valentin Albillo - 09-26-2016, 11:04 AM
|
User(s) browsing this thread: 1 Guest(s)