Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #coding
- text = input()
- e_is_found = False
- n_is_found = False
- first = 0
- second = 0
- for i in range(len(text)):
- if text[i] == "e":
- e_is_found = True
- first = text[i]
- continue
- if e_is_found:
- if n_is_found:
- if text[i] == "d":
- print("end")
- break
- else:
- print(ord(first))
- print(ord(second))
- e_is_found = False
- n_is_found = False
- if text[i] == "n":
- n_is_found = True
- second = text[i]
- continue
- else:
- print(ord(first))
- e_is_found = False
- print(ord(text[i]))
- # decoding
- massage = ""
- command = input()
- while command != "end":
- text = int(command)
- massage += chr(text)
- command = input()
- else:
- print(massage)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement