Educational Codeforces Round 80

Please with the explanation of the editorial
Yet another meme problem:
Educational Codeforces Round 80

1 Like

conc(A,B) is technically (10^no. of digits in B)A+(B) (this is the mathematical definition
let k =no of digits in b
we get:
Therefore A can be any number in the given range but B should be of the form 99…9.
Count the no of numbers of the form 99…9 and multiply it with the number of possible A values to get the answer


Another way to do this is by trying to do it for small numbers like till 1000
like try to generate all numbers at A=1000 and B=1000.
you will see that B always uses 9,99,999 and A is going from to 1-1000 three times.
This is the observation part of it in case you aren’t able to prove it with maths.

1 Like