⟩ In how many ways can a lock be opened if that lock has three digit number lock ifi) the last digit is 9ii) and sum of the first two digits is less than or equal to the last digit
our number is xy9
now if x is 0 then y has 10 options
now if x is 1 then y has 9 options (except 9)
now if x is 2 then y has 8 options (except 9 and 8)
.
.
.
now if x is 9 then y has 1 option (that is 0)