#871 INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A # A = 113 is the maximum number of loops needed (X=871) # To beat: # 5894250 43 pt # 5239377 47 pt # 5239198 # 5238841 # 5238663 # 4911340 50 pt # 4910739 # 4910609 # 4910399 INCREASE R REPEAT A TIMES ( REPEAT R TIMES ( # WHILE R CLEAR H CLEAR M CLEAR B CLEAR E INCREASE E REPEAT X TIMES ( INCREASE B REPEAT M TIMES ( CLEAR B CLEAR M INCREASE H CLEAR E ) # 00>01, 11>00 REPEAT B TIMES ( INCREASE M ) # 00>00, 01>11 ) REPEAT E TIMES ( CLEAR R ) # H := HALF X # M := MOD2 X # B := MOD2 X # E := ISZERO HALF X # R := Running... REPEAT R TIMES ( # IF NOT R: BREAK PRINT X INCREASE P REPEAT M TIMES ( # IF X IS ODD CLEAR Z REPEAT X TIMES ( INCREASE Z INCREASE Z INCREASE Z ) INCREASE Z PRINT Z # Z = 3X+1 REPEAT H TIMES ( INCREASE X ) INCREASE X # X = 3/2X + 1 CLEAR P ) REPEAT P TIMES ( # ELSE X IS EVEN CLEAR X REPEAT H TIMES ( INCREASE X ) CLEAR P ) ) ) ) PRINT X