Sponsored
Use these hints if you're stuck. Try solving on your own first.
You can reduce <code>k</code> shifts to <code>(k % n)</code> shifts as after <code>n</code> shifts the matrix will become similar to the initial matrix.
Solve with full IDE support and test cases