You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When n is less or equal to 2, copy-pasting is not worth it.
Otherwise, we have check the parity of n. If the number of operations left is odd, we have to add another character because we need an equal number of copy actions and paste actions. Then, we compute the number of times we double with n//2, the number of copy and paste.