+ 13
[Challenge] Find the numbers of this sum
In a certain numeric base, something curious happens if you sum the same three-digit number three times: ABC ABC ABC + ______ CCC Consider that A, B and C are the digits of these numbers in that specific base. Now, write a code able to answer these two questions: 1) Find numbers ABC and CCC for base 10, if possible. 2) Find numbers ABC and CCC for a base given by the user, if possible. If it is not possible, show a message saying it is impossible. :( Solutions must be non-trivial, that is: ABC and CCC must not equal zero. All weapons welcome! Let's do this!! EDIT: I just wrote a code so you people can check your results. https://code.sololearn.com/cwP2kkt0h2Eq/
6 Answers
+ 6
My try (only first part):
https://code.sololearn.com/cST40F08sscS/#py
+ 6
@pedro it is a very good Algorithms based Challenge.
Why Don't you make them Assignment.
What's your Opinion about Assignment and Answer it Here.
https://www.sololearn.com/discuss/1082512/?ref=app
+ 5
https://code.sololearn.com/c2XGuPnw1z7d/?ref=app
+ 3
@Vishal, that's a good idea! Thank you for the compliment.
+ 2
Without program - in base 10:
185
185
185
-------
555
This is easily determined by a simple award: the last digit multiplied by 3 gave the result ending in it. This property is possessed by 0 and 5. Obviously, 0 is not good. Further similarly computes the remaining digits.