Post Reply 
HHC 2017 RPN Programming contest information and results thread
09-18-2017, 09:23 PM (This post was last modified: 09-19-2017 04:34 PM by Don Shepherd.)
Post: #29
RE: HHC 2017 RPN Programming contest information and results thread
Never having used a 41, I wanted to implement the problem using the 17bii solver. Here is the equation:
Code:
HAPPY:HAP+CYC+
ANS=SIGMA(I:1:100:1:
L(N:SIGMA(J:0:LOG(NUM):1:
SQ(MOD(IDIV(NUM:10^J):10))))
+L(NUM:G(N))+
IF(NUM=1 OR NUM=4:L(HAP:NUM)+L(CYC:I)/0:0))

This is not a normal solver equation, it takes advantage of the fact you can exit a loop by inducing an error in the calculation (divide by 0 works well) after saving whatever values you want in variables that you can then RCL. So, to run this, enter your desired number to test and press NUM. Then press ANS (solve for ANS). After a few seconds it will beep and display SOLUTION NOT FOUND. Just RCL HAP (4=unhappy, 1=happy) and RCL CYC for the number of cycles.
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 - Don Shepherd - 09-18-2017 09:23 PM



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