I'm quite intrigued by an "easy" problem in recent Codeforces contest: Codeforces Subsequences.
In this problem, you have to create a string $T$ as shortest as possible such that $S = $ "CODEFORCES" appears as the subsequence (not substring) of $T$ at least $K$ times. We actually don't care about this $K$, for this puzzle at least, as we can reformulate the problem as the following:
Given $S = $ "CODEFORCES", find a string with length $N$ such that $S$ appears as subsequence as many as possible.
It turns out, this "simple" strategy works well (marked as spoiler, as this is also the solution for the original problem, but this is needed for the puzzle):
You try to clone the first letter 'C', then clone the next 'O', then clone the next 'D', and so on. After cloning the last letter 'S', you clone again the 'C' (so there are $3$ 'C's) then 'O' (so there are $3$ 'O's) and so on. You keep doing this until the length is $N$.
So if $N = 23$, then "CCCOOODDDEEFFOORRCCEESS" is optimal. There are $3^3 \times 2^7 = 3456$ subsequences of $S = $ "CODEFORCES" for your information.
Now the puzzle is this. Above strategy is pretty "obvious" to be correct for... most of possible $S$ and $N$. Surprisingly, for some people I think, actually it won't work for all possible $S$ and $N$. You task is to find such $S$ and $N$ so that above strategy is wrong!
Nb. Even if this problem is taken from the Competitive Programming contest, this puzzle should be done by hand, thus no-computers. A subsequence is a sequence generated from a string after deleting some characters of string without changing the order of remaining string characters.