Post Reply 
HHC 2017 RPN Programming contest information and results thread
09-19-2017, 12:14 PM
Post: #35
RE: HHC 2017 RPN Programming contest information and results thread
(09-19-2017 05:57 AM)Werner Wrote:  Well, I missed all big improvements (ATOX, the 1/4 combined test), all I did was find two tricks ;-)

Now, what should 1 HAPPY return? "HAPPY 1" or "HAPPY 0"? I vote for the latter.
It's logical that 1 HAPPY is "HAPPY 0" and 10 HAPPY is "HAPPY 1".

Cheers, Werner

Hello all! The powers of the on-site judge are nearly all-inclusive.

Per the rules I wrote :-) which say this:

"Start with a number and replace it with the sum of the squares of each of its digits. Compare the computed sum of these squares to the rules below. Repeat the process with the previous result as the next input."

1 should return HAPPY 1.

Start with a number - in this case 1 is entered.

Then replace it with the sum of the squares of each of its digits. Ok, still 1.

THEN compare the computed sum to the rules below.

At this point, one cycle has occurred so when 1 is evaluated, the cycle count should be 1. Same score as 10 or 100 etc. of course.

:-)
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 - Gene - 09-19-2017 12:14 PM



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