Advertisement
DiYane

Treasure finder

Sep 26th, 2023
976
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. secret_key = [int(x) for x in input().split()]
  2. secret_msg = input()
  3.  
  4. how_long = len(secret_key)
  5. while secret_msg != "find":
  6.     secret_text = "".join([chr(ord(secret_msg[i]) - secret_key[i % how_long]) for i in range(len(secret_msg))])
  7.     item = secret_text.split("&")[-2]
  8.     location = secret_text.split("<")[-1][:-1]
  9.     print(f"Found {item} at {location}")
  10.     secret_msg = input()
Tags: python
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement