I am getting wrong answer according to the logic implemented below.
For k=2 there will be 100 signs indexing from 0 to 99. We have to find out i and 10^k - i - 1 such that i and 10^k - i - 1 have two distinct digits. So the digits are
0,1,2,3,4,5,6,7,8,9
All 10 digits from 0 to 9.Therefore count= 10.
i 10^k - i - 1
11 88
18 81
22 77
27 72
33 66
44 55
45 54
so the count is 26 but according to editorial the ans of count is 20
How is it possible?
Sorry, It won’t happen again.
1 Like