solved challenge 144

This commit is contained in:
Kristian Krsnik 2023-08-24 00:06:05 +02:00
parent dbfba43657
commit f83393b0a7
2 changed files with 16 additions and 0 deletions

1
000-999/144/inputs/input Normal file
View File

@ -0,0 +1 @@
cvpbPGS{arkg_gvzr_V'yy_gel_2_ebhaqf_bs_ebg13_uJdSftmh}

15
000-999/144/main.py Normal file
View File

@ -0,0 +1,15 @@
def rot13(message):
subs = {'A': 'N', 'B': 'O', 'C': 'P', 'D': 'Q', 'E': 'R', 'F': 'S', 'G': 'T', 'H': 'U', 'I': 'V', 'J': 'W', 'K': 'X', 'L': 'Y', 'M': 'Z', 'N': 'A', 'O': 'B', 'P': 'C', 'Q': 'D', 'R': 'E', 'S': 'F', 'T': 'G', 'U': 'H', 'V': 'I', 'W': 'J', 'X': 'K', 'Y': 'L', 'Z': 'M',
'a': 'N', 'b': 'O', 'c': 'P', 'd': 'Q', 'e': 'R', 'f': 'S', 'g': 'T', 'h': 'U', 'i': 'V', 'j': 'W', 'k': 'X', 'l': 'Y', 'm': 'Z', 'n': 'A', 'o': 'B', 'p': 'C', 'q': 'D', 'r': 'E', 's': 'F', 't': 'G', 'u': 'H', 'v': 'I', 'w': 'J', 'x': 'K', 'y': 'L', 'z': 'M'}
return ''.join(list(map(
lambda x: subs[x] if x in subs else x,
message
)))
if __name__ == '__main__':
with open('./000-999/144/inputs/input') as file:
input = file.read()
print(rot13(input))