Compare commits

..

No commits in common. "e8c84a0cb67a2ebbcf3aca048aa7cccc48291ba9" and "fc223c27466b03ccebcbf22091bd2479de14f0c8" have entirely different histories.

3 changed files with 0 additions and 1022 deletions

View file

@ -1,2 +0,0 @@
1714680
1963088820

File diff suppressed because it is too large Load diff

View file

@ -1,20 +0,0 @@
#!/usr/bin/env python
import sys
if __name__ == '__main__':
x = 0
y = 0
z = 0
for line in sys.stdin.readlines():
dir, amount = line.split()
amount = int(amount)
if dir == 'forward':
x += amount
z += y * amount
elif dir == 'down':
y += amount
elif dir == 'up':
y -= amount
print(x*y)
print(x*z)