Post Reply 
RPL Mini-Challenge: All Odd Digits?
07-02-2017, 06:37 AM (This post was last modified: 07-02-2017 10:05 AM by Gerald H.)
Post: #2
RE: RPL Mini-Challenge: All Odd Digits?
A first suggestion:

Code:

« 1. SWAP →STR 0 8
  FOR i i →STR "0" SREPL
    IF
    THEN NIP 0. SWAP 10
    ELSE 2
    END
  STEP DROP
»

Time in seconds for 1000th repunit (worst case)

.13 sec

byte size of programme

84.5

giving a score of 10.95

Edit: As most 1000 digit numbers contain a zero, average score would be 5.2
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: RPL Mini-Challenge: All Odd Digits? - Gerald H - 07-02-2017 06:37 AM



User(s) browsing this thread: 3 Guest(s)