1

I want some formula which can take as an input a 4 digit number and outputs a 5 digit number. This 5 digit number is actually the input with a zero in between. Example: input: 1234 -> output: 12034 input: 6570 -> output: 65070 ...

Talha
  • 13
  • 2
    I'm not entirely sure what your question is – Luke Peachey Dec 01 '17 at 17:40
  • Your description couldn't be simpler. Perhaps you are asking for some other kind of description? If so, you should be more explicit about what kind of description you are asking for. – Lee Mosher Dec 01 '17 at 17:42

1 Answers1

2

How about $n \mapsto n+900(\lfloor\frac{n}{100}\rfloor)$ ?

Edited to add: I don't know whether this is the most computationally efficient formula. Now that I'm thinking about it, the question of efficiency is quite interesting, but I don't have the expertise to know whether I could have done better.

MMASRP63
  • 298
  • 1
  • 12