I need help: regarding modulo and array shifting

Revision en3, by Apricus, 2022-03-14 21:35:14

Hi Codeforces Friends, I was recently doing an array shift left problem and I was trying to use modulo to achieve that. However, I wasn't able to derive a general formula for it, and I try this in both the 0-index way and the 1-index way. Do you guys have any idea?

ex:

k — the number of times to shift left

A — the array

output the final array after k times shifting left

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Apricus 2022-03-14 21:35:14 2 Tiny change: ' \n\nex:\nk &mdash' -> ' \n\nex:\n\nk &mdash'
en2 English Apricus 2022-03-14 21:34:45 2 Tiny change: 'ft left \nA &mdash' -> 'ft left \n\nA &mdash'
en1 English Apricus 2022-03-14 21:34:27 443 Initial revision (published)