Skip to content

Commit

Permalink
Submission Accepted on the Beecrowd !
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitrimarinho committed Jan 1, 2022
1 parent 2e6dabe commit 6c28993
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Strings Level/Python Codes/1024 - Criptografia.py
Original file line number Diff line number Diff line change
@@ -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 !

0 comments on commit 6c28993

Please sign in to comment.