Skip to content
Snippets Groups Projects
20.py 167 B
Newer Older
fname = "numbers.num"

snum = 0
with open(fname, "rb") as file:
    while (byte := file.read(2)):
        snum += int.from_bytes(byte)

snum = snum % 2**16
print(snum)