Post Reply 
HHC 2017 RPN Programming contest information and results thread
09-18-2017, 12:51 AM
Post: #17
RE: HHC 2017 RPN Programming contest information and results thread
Well, I got it to 70 bytes, but we found some edge cases it choked on (0 cycles). Changing the position of one instruction fixes it, without affecting the size. Here's the fixed version for anybody that wants to vastly outdo me. Big Grin

Code:
LBL "HAPPY"
CF 29
FIX 0
0
X<>Y
ENTER^
CLA
LBL 00
RDN
4
X=Y?
GTO 4
RDN
1
X=Y?
GTO 03
RDN
ARCL ST X
CLX
ISG ST Y
LBL 01
ATOX
X=0?
GTO 00
48
-
X^2
+
GTO 01
LBL 04
"UN"
LBL 03
|-"HAPPY " (Note the space after the Y)
ARCL ST Z
SF 29
FIX 4
AVIEW
END
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HHC 2017 RPN Programming contest information and results thread - Dave Britten - 09-18-2017 12:51 AM



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