wasif1607's blog

By wasif1607, history, 10 months ago, In English

1808A - Lucky Numbers

In this question, If the ans of l = 1 to r = 9 is 9 (luckiest number)
Then why not the answer of l = 1 to r = 10 is 9! (luckiest number) Instead it is given as 10.

Condition for luckiest no. is that diff of highest digit of a no. with it's lowest digit.
eg: num = 992 so luckiness = 9 — 2 = 7

  • Vote: I like it
  • +1
  • Vote: I do not like it

»
10 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Luck is (highest digit — lowest digit).

From 1-9, all digits have luck 0. Hence any number from 1-9 can be answer.

From 1-10, all digits have luck 0, except 10 (whose luck is 1). Hence 10 is the answer.