rev/virtual_machine_0

This commit is contained in:
2024-09-06 21:01:14 +02:00
parent 82dcc622d9
commit 29dc2db38e
5 changed files with 1315 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env python3
INPUT_WHEEL_TEETH = 40
OUTPUT_WHEEL_TEETH = 8
with open('input.txt') as file:
content = file.read().strip()
rotation_output = int(content) * (INPUT_WHEEL_TEETH // OUTPUT_WHEEL_TEETH)
print(rotation_output.to_bytes((rotation_output.bit_length() + 7) // 8, 'big').decode())