+ 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/

18th Feb 2018, 3:09 PM
Pedro Maimere
Pedro Maimere - avatar
6 Answers
+ 6
18th Feb 2018, 2:36 AM
Matheus Fernandes
Matheus Fernandes - avatar
+ 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
18th Feb 2018, 5:01 PM
Vishal Palā„ļøāš›ļø
Vishal Palā„ļøāš›ļø - avatar
+ 5
https://code.sololearn.com/c2XGuPnw1z7d/?ref=app
18th Feb 2018, 2:11 AM
Alex
Alex - avatar
+ 3
@Vishal, that's a good idea! Thank you for the compliment.
18th Feb 2018, 8:01 PM
Pedro Maimere
Pedro Maimere - avatar
+ 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.
18th Feb 2018, 8:57 PM
Š’Š°Š“ŠøŠ¼ Š”ухŠ¾Ń‚ŠøŠ½ (Vadim Sukhotin)
Š’Š°Š“ŠøŠ¼ Š”ухŠ¾Ń‚ŠøŠ½ (Vadim Sukhotin) - avatar
19th Feb 2018, 11:09 AM
Š’Š°Š“ŠøŠ¼ Š”ухŠ¾Ń‚ŠøŠ½ (Vadim Sukhotin)
Š’Š°Š“ŠøŠ¼ Š”ухŠ¾Ń‚ŠøŠ½ (Vadim Sukhotin) - avatar