Sponsored
Use these hints if you're stuck. Try solving on your own first.
<code>t</code> should only have 2, 3, 5 and 7 as prime factors.
Find the shortest suffix that must be changed.
Try to form the string greedily.
Solve with full IDE support and test cases