Imagine i get an input 123 my goal is to return 112233.How can i get that?I can't use strings because i have to multiply that same later

  • 5
    $\begingroup$ Programming questions are off topic here. Try Stackoverflow. $\endgroup$ – adrianN Dec 26 '16 at 17:27

Convert to string, double characters, convert back to number.

| cite | improve this answer | |
  • $\begingroup$ Sorry, but the question is off-topic and your answer is not the fastest solution. $\endgroup$ – Evil Dec 26 '16 at 22:57
  • 1
    $\begingroup$ It is the definitely fastest in terms of typing. Moreover, I can't detect even a infinitesimal hint from the author about time performance. $\endgroup$ – Eugene Dec 27 '16 at 0:38
  • $\begingroup$ Ok, so apparently off-topic. Yes, there was no even slightest hint about the performance. $\endgroup$ – Evil Dec 27 '16 at 18:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.