Let us consider 10 successive five digit numbers a1a2a3a40 a1a2a3a41 a1a2a3a42 ……………… a1a2a3a49
Where, a1,a2,a3,a4 are some digits. We see that half of these 10 numbers i.e. 5 have an even sum of digits.
The first digit a1 can takes 2,3,4,5 and each of the digits a2,a3,a4 can takes 10 different values the units place digit can assume only 5 different values of which the sum of all digits is even.
So, value of K is =4×103×5−1 [∵20,000 will not include ] =19999