deadshot1928's blog

By deadshot1928, history, 6 weeks 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

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by deadshot1928 (previous revision, new revision, compare).

»
6 weeks 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?

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

    You were a bit faster :)

»
6 weeks 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.