Add some stuff from yesterday

This commit is contained in:
2021-05-14 10:11:09 -05:00
parent 89c2919008
commit d025209854
6 changed files with 114 additions and 0 deletions

25
22/decode.py Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env python3
import sys
rawInput = sys.stdin.readlines()
splitInput = [l.strip() for l in rawInput]
for c in splitInput:
try:
int(c)
is_int = True
except ValueError:
is_int = False
assert is_int, "Input must be in decimal form, and separated by newlines"
rawOutput = []
for c in splitInput:
c2 = chr(int(c))
rawOutput.append(c2)
output = ""
for c in rawOutput:
output += c
print(output)