Post Reply 
HHC 2022 - Programming Contest - no responses until after 6am Monday 6am CENTRAL
09-12-2022, 03:18 AM
Post: #11
RE: HHC 2022 - Programming Contest - no responses until after 6am Monday 6am CENTRAL
(09-12-2022 03:02 AM)C.Ret Wrote:  
(09-11-2022 01:30 AM)Gene Wrote:  Output: Two items: The resulting palindromic number and the number of additions / cycles required to reach it. Place the number in stack level 1 (or X) and number of cycles in level 2 (or Y). If the input number does not reach a palindromic sum ...


What is the expected results for 323: (a) Y:0 X:323 or (b) Y:4 X:7337 ?

Y: 1
X: 646

323 + 323 = 646 (a palindrome, so stop)

Notice you have to make at least one addition, no matter the input is a palindrome or not. See test case number 3 which is a palindrome (99).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread



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