Post Reply 
HHC 2019 will be in Reno, Nevada, Sept 21-22
09-22-2019, 05:02 PM
Post: #22
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
From David Ramsey:

Quote:HHC 2019 Programming Contest

Your mission, should you decide to accept it, is to write a program that finds all 3-digit numbers equal to the sums of the cubes of their digits. This is a simple problem but there are many optimizations possible for doing this on a programmable calculator.

As an example, the number 153 would qualify, since:

1x1x1 = 1
5x5x5 = 125
3x3x3 = 27

and 1+125+27 = 153

There are four numbers that satisfy this condition.

This program requires no input and the output should consist of the four numbers. It's assumed that RPN calculators will be HP-41, HP-42S, or SwissMicros variations such as the DM42.

Da Rulez

RPN and RPL calculators: Programs must be started by pressing R/S or a defined function or label key. When the program completes the four numbers should be on the stack.

Prime calculators: Do it your way. I don't know nuthin' about no Primes.

65/97/15C calculators: It can be done. Impress me.

Your contest entry should consist of a calculator with your program installed and ready to run, and a listing of the program. Comments are appreciated in the source.

Programs will be judged on speed, efficiency, and sheer algorithmic cleverness. The definitions of these terms are teh sole province of the judges. No appeals. There may be prizes, depending on what I can find interesting in my junk pile.
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 2019 will be in Reno, Nevada, Sept 21-22 - Eric Rechlin - 09-22-2019 05:02 PM



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