gaus
Professor Djuric is having difficulty with his naughty pupils. In order to distract them, he has decided to give them a problem that at first glance appears to be very difficult. In the past, Professor Djuric's favorite problem was to ask for the summation of the first 1000 numbers. But, since Little Gaus has found a way to quickly compute that sum, the professor has to change problem.
So, Professor Djuric has come up with this new problem: he will give the positive integers A and B to his pupils. Then he will ask them how many numbers from the interval [ A , B ] (i.e. all numbers greater than or equal to A and less than or equal to B) have an even sum of digits (for example, the sum of the digits of the number 1234 is 1 + 2 + 3 + 4 = 10, so it is an even sum).
However, among the pupils there is Little Draganche, who like Little Gaus, wants to solve that problem as quickly as possible and continue to cause problems for Professor Djuric. Because Draganche didn't succeed in finding the solution, he is asking for your help.
5 15Output:
516 20Output:
3Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.