JarvisOJ--.-字符串

Problem Description

请选手观察以下密文并转换成flag形式

..-. .-.. .- --. ..... ..--- ..--- ----- .---- ---.. -.. -.... -.... ..... ...-- ---.. --... -.. .---- -.. .- ----. ...-- .---- ---.. .---- ..--- -... --... --... --... -.... ...-- ....- .---- -----

flag形式为32位大写md5


题解

这种东西一看就能够猜到是莫尔斯电码

用python跑一下就行了

sentence = input("input:\n")
words = sentence.split(" ")
dictionary = {'.-': 'A', '-...': 'B', '-.-.': 'C', '-..':'D', '.':'E', '..-.':'F', '--.': 'G', '....': 'H', '..': 'I', '.---':'J', '-.-': 'K', '.-..': 'L', '--': 'M', '-.': 'N', '---': 'O', '.--.': 'P', '--.-': 'Q', '.-.': 'R', '...': 'S', '-': 'T', '..-': 'U', '...-': 'V', '.--': 'W', '-..-': 'X', '-.--': 'Y', '--..': 'Z', '.----': '1', '..---': '2', '...--': '3', '....-': '4', '.....': '5', '-....': '6', '--...': '7', '---..': '8', '----.': '9', '-----': '0', '..--..': '?', '-..-.': '/', '-.--.-': '()', '-....-': '-', '.-.-.-': '.' }
for word in words:
    print (dictionary[word],end='')

Ans: 522018D665387D1DA931812B77763410

上一篇:python中return和print的区别(详细)


下一篇:R语言基于线性回归的资本资产定价模型(CAPM)