deadshot1928's blog

By deadshot1928, history, 20 months ago, In English

A number having all digits even is called a lucky number. Example 244, 566...

Find Kth lucky number(1st lucky number is 0).

Constraint 1<=k<=10^12

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

| Write comment?
»
20 months ago, # |
  Vote: I like it +5 Vote: I do not like it

isn't it just generating k-th number in base 5 and changing digits?

  • »
    »
    20 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    You were a bit faster :)

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

One has to present $$$K-1$$$ in quinary number system (with base 5) and double all its digits, that will be the answer.