Skip to content

Instantly share code, notes, and snippets.

@onikazu
Created November 27, 2019 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onikazu/efb6627090be1b4198b188589421dcbe to your computer and use it in GitHub Desktop.
Save onikazu/efb6627090be1b4198b188589421dcbe to your computer and use it in GitHub Desktop.
n= int(input())
s = input()
# ord(A) -> 65, ord(Z) -> 90
ans = ""
for i in range(len(s)):
chr_num = ord(s[i]) + n
if chr_num > 90:
chr_num = (chr_num % 90) + 64
ans += chr(chr_num)
print(ans)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment