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.

14
  • 2
    \$\begingroup\$ I assume it's intended that when you select all, copy, then paste, the paste doesn't overwrite the selection but appends to it? \$\endgroup\$
    – xnor
    Commented Jul 4 at 20:23
  • 5
    \$\begingroup\$ Does "containing n copies of the original string" mean at least n, or exactly n? \$\endgroup\$
    – xnor
    Commented Jul 4 at 20:24
  • 2
    \$\begingroup\$ I don't understand why \$f(4)=6\$. Can't you quadruple in just 5 operations by doing select-all, copy, paste, paste, paste? Since the pastes append as you say, only 3 are needed here. \$\endgroup\$
    – xnor
    Commented Jul 4 at 22:36
  • 5
    \$\begingroup\$ I went through the math.se post and I think there is a typo in the formula: (1,1) should be (0,1). This change affects all test inputs which are in the form of 4^k. Added a comment about this on the math.se post too. \$\endgroup\$
    – Bubbler
    Commented Jul 4 at 23:49
  • 4
    \$\begingroup\$ The fixed formula agrees with an algorithmic solution for up to 1e6. \$\endgroup\$
    – Bubbler
    Commented Jul 5 at 0:52