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*

12
  • \$\begingroup\$ Golfed your code by 2 bytes: tio.run/… \$\endgroup\$ Commented Aug 9, 2019 at 6:09
  • \$\begingroup\$ @IQuick143 Nice catch, thanks \$\endgroup\$ Commented Aug 9, 2019 at 6:27
  • \$\begingroup\$ I'm not sure if there are any edge cases for which it won't work, but without breaking any of the current test cases you could replace 1<<f with 2*f to save a byte. \$\endgroup\$ Commented Aug 9, 2019 at 9:13
  • 1
    \$\begingroup\$ 77 bytes with horrible LINQ magic and Arnauld's fix. I have no idea how does this solution work, so I may have broken it. \$\endgroup\$ Commented Aug 9, 2019 at 12:08
  • 1
    \$\begingroup\$ 63 bytes via a normal sane 1-byte golf and changing IO to error/no error. Link to link \$\endgroup\$ Commented Aug 9, 2019 at 13:13