University of Calgary

Digital Coincidences

Digital Coincidences
Source: ACM programming contest
If I multiply, and also add 9 and 9 I get 81 and 18 which contain the same figures. If I multiply and add 2 and 47 I get 94 and 49 - the same figures. If I multiply and add 3 and 24, I get the same figures - 72 and 27. Can you write a program to find 2 numbers that when multiplied and added will in this manner produce the same three figures? (there are 2 cases - find both).



Updated: August 30, 2005 05:25 PM