Chef and String
Chef has recently joined Exun, a member of the “We not I” legacy, so he wants to apply this motto to a string he received on his birthday! Chef's string, denoted $A$, is very large. So, you are instead given a smaller string $S$ of length $N$ and a positive integer $K$. Chef's string is then represented by the string $A = \underbrace{S + S + S + \ldots + S}_{K \text{ times}}$, where $+$ denot
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start