Last active
June 2, 2022 02:41
-
-
Save Bruno02468/3195419e1fc00a8e26942bf929ad7952 to your computer and use it in GitHub Desktop.
EP2 da turma Python 2019 de MAC2166 -- só que em duas linhas (foi um desafio kkkkj)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
z,k,m=(int(input("0 ou 1?\n")),int(input("chave?\n")),list(map(lambda c:"_ABCDEFGHIJKLMNOPQRSTUVWXYZ.".index(c),list(input("mensagem?\n").upper())))) | |
print("".join(map(lambda u:"_ABCDEFGHIJKLMNOPQRSTUVWXYZ."[u[1]], sorted([([i,k*i%len(m)][z]%28,[m[k*i%len(m)]-i,m[i]+i][z]%28) for i in range(len(m))], key=lambda u:u[0])))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
p.s.: por 40 conto a hora ensino a fazer igual