Rozwiązanie zadania "CRC" #24

Closed
s426211 wants to merge 8 commits from (deleted):zad3 into master
Showing only changes of commit c7905f9e2e - Show all commits

View File

@ -8,6 +8,15 @@ if __name__ == "__main__":
if len(message) % 2 != 0:
message = "0" + message
swapped = list(message)
for i in range(gen_deg - 1):
if swapped[i] == "0":
swapped[i] = "1"
else:
swapped[i] = "0"
message = "".join(swapped)
while True:
if message[0] == "0":