This is a very good question.

x = 10^10 - z

Now what is 10^2 = 100 ; 1 followed by 2 zeros

10^3 = 1000 ; 1 followed by 3 zeros

Similarly 10^10 is 1 followed by 10 zeros

Now you are subtracting a 2 digit number from this. Values that z can take is any number between 10 to 99.

Now let us try to understand step by step the range of values x can take.

when you subtract 100-10 you get 90 & when you subtract 100-99 you get 1

when you subtract 1000-10 you get 990 & when you subtract 1000-99 you get 901

when you subtract 10000-10 you get 9990 & when you subtract 10000-99 you get 9901 i.e numbers are between 9901 and 9990

So you can see a pattern here:

When you subtract 10 from a number which is '1 followed by 10 zeros' you will get 9999999990 i.e 8 '9's followed by 90

& When you subtract 99 from a number which is '1 followed by 10 zeros' you will get 9999999901 i.e. 8 '9's followed by 01

So now we know range of values x can take i.e 9999999901 to 9999999990

The first 8 digit gives you a sum of 8*9 = 72. You need 12 more to make it 84. So focus on last 2 digits of 99999999|01 to 99999999|90 i.e 01 to 90.

How many numbers are there between 01 and 90 that gives you a sum of 12?

Start writing it down.

39.

48

57

66

75

84

93 is out of the range. So don't consider that.

So one value of x = 9999999939. How did you get this? By subtracting 61 from 10^10. So z = 61.

Likewise there are 6 possible values of x : 9999999939, 9999999948, 9999999957, 9999999966, 9999999975, 9999999984

As there are 6 possible values of x which gives you a sum of 84, there are 6 possible values of z as well.

Hope you understood.

Consider giving Kudos if you understood.

Cheers

Ambarish

_________________

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Kindly press Kudos if the explanation is clear.

Thank you

Ambarish