Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

15
  • \$\begingroup\$ You can save two bytes by defining j="".join (adding 9+1 bytes) and replacing ''.join with j (saving 6*2 bytes; 10-12 = -2). \$\endgroup\$ Commented Sep 8, 2017 at 13:34
  • \$\begingroup\$ @JonathanFrech Cool, thanks \$\endgroup\$ Commented Sep 8, 2017 at 13:38
  • \$\begingroup\$ Also, as the input is always one integer, you can replace eval with int to save one entire byte. Using Python 2, one could entirely remove eval() (6 bytes) and the print parentheses (1 byte) to save 7 bytes. \$\endgroup\$ Commented Sep 8, 2017 at 15:37
  • \$\begingroup\$ Looks good, but the output should contains new lines in it! You are almost done. \$\endgroup\$ Commented Sep 8, 2017 at 15:56
  • \$\begingroup\$ @CyrilGandon done \$\endgroup\$ Commented Sep 8, 2017 at 16:54