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*

2
  • 2
    \$\begingroup\$ 102 bytes by changing .split("7",-1) to .split("7",9), and -6+(n>99?4:0) to -(n>99?2:6). \$\endgroup\$ Commented Dec 19, 2018 at 10:09
  • 1
    \$\begingroup\$ @OlivierGrégoire Thanks. Completely missed -(n>99?2:6), but it's so obvious now that you've pointed it out. And -1 to 9 due to the limited input-size I wouldn't have thought of, so thanks! \$\endgroup\$ Commented Dec 19, 2018 at 11:22