#3210

Find the Encrypted String

pupil · 315 · lc easy +21 · 68.2% accepted · 112 likes · top 75%

Description

You are given a string s and an integer k. Encrypt s by replacing each character at position i with the character k positions ahead, wrapping around cyclically.

Return the encrypted string.

Code

1
2
3