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*

3
  • \$\begingroup\$ You can cut two bytes by removing the backticks around bin(x). You can also remove one by changing range(n*n+1) to range(n<<n). (Assuming 0 is invalid) \$\endgroup\$ Commented Oct 30, 2018 at 1:26
  • \$\begingroup\$ I dunno what I was thinking with the backticks around bin(x), haha. And, hm, 1<<n is already way, way more than enough, but I'd like to keep the runtime non-astronomical \$\endgroup\$ Commented Oct 30, 2018 at 2:29
  • \$\begingroup\$ Fair point, I guess being able to run the code might be an important attribute. :) \$\endgroup\$ Commented Oct 30, 2018 at 2:35