Seongbeom Park 8124382a8f finish extra/i-love-lance-janice
Submitting solution...
Submission: SUCCESSFUL. Completed in: 34 mins, 26 secs.
2022-05-10 23:08:48 +09:00

18 lines
533 B
Python

def solution(x):
result = ""
for c in x:
if ord('a') <= ord(c) and ord(c) <= ord('z'):
result += chr(ord('a') + ord('z') - ord(c))
else:
result += c
return result
tests = [
("wrw blf hvv ozhg mrtsg'h vkrhlwv?", "did you see last night's episode?"),
("Yvzs! I xzm'g yvorvev Lzmxv olhg srh qly zg gsv xlolmb!!", "Yeah! I can't believe Lance lost his job at the colony!!"),
]
for i, o in tests:
result = solution(i)
print (i, result == o, result, o)