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
  • 6
    \$\begingroup\$ My personal feeling is that a program that needs to be called in two different ways (using two different calling setups) is really two programs, so scoring 2 bytes here. But it's pretty cool anyway. \$\endgroup\$ Commented Jun 13, 2022 at 9:45
  • 2
    \$\begingroup\$ @DominicvanEssen I mostly agree with this, although technically you don’t have to use ~ to call this program in the opposite way; you could just give a fixed output and a variable input. It’s just needed when I run both f and g in the same TryItOnline example. I’ve edited my answer anyway. \$\endgroup\$ Commented Jun 13, 2022 at 10:56