Andriy and Olesya write a natural number each on a chalkboard. It turns out, that number, written by Olesya, has sum of digits and has precisely digit less than Andriy's number. It is also known, that difference of numbers, written by him, equals to one-digit number. What can be the number, written by Andriy?
Solution
It is not hard to see, that Andriy's number can only be , and Olesya's – only: . Otherwise, the difference will not be a one-digit number. Really, if not all Olesya's digits, except for the last, are , then after adding a one-digit number, the number of digits will not change. So this is the presentation of Andriy's number. The sum of digits of Olesya's number equals , so it is (as ). So Andriy's number has to have the last digit less than , because otherwise the difference of written numbers will not be less than . So, this number can be or . So, he wrote number , or .
Looking for a route rather than an archive? The track puts 2,000
problems in a working order, from AMC 10 level to the IMO shortlist.