diff --git a/Strings Level/Python Codes/1024 - Criptografia.py b/Strings Level/Python Codes/1024 - Criptografia.py new file mode 100644 index 0000000..e7e3a14 --- /dev/null +++ b/Strings Level/Python Codes/1024 - Criptografia.py @@ -0,0 +1,19 @@ +# Name of the problem: Criptografia +# Link: https://www.beecrowd.com.br/judge/pt/problems/view/1024 + +N = int(input()) +for i in range(N): + M = list(input()) + for pos in range(len(M)): + carac = ord(M[pos]) + if((carac >= 65 and carac <= 90) or (carac >= 97 and carac <= 122)): + M[pos] = chr(carac + 3) + M.reverse() + middle = int((len(M)/2)) + for pos in range(len(M)): + if(pos >= middle): + carac = ord(M[pos]) + M[pos] = chr(carac - 1) + print(''.join(M)) + +# Submission Accepted on the Beecrowd ! \ No newline at end of file