This commit is contained in:
dave 2018-12-01 17:43:30 -08:00
commit eb92bd8f4c
3 changed files with 1046 additions and 0 deletions

13
1/1.py Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env python3
def main():
total = 0
with open("input.txt") as f:
for line in f.readlines():
total += int(line)
print(total)
if __name__ == '__main__':
main()

19
1/1b.py Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env python3
def main():
total = 0
seen = {}
with open("input.txt") as f:
numbers = [int(i) for i in f.readlines()]
while True:
for number in numbers:
total += number
if total in seen:
print(total)
return
seen[total] = None
if __name__ == '__main__':
main()

1014
1/input.txt Normal file

File diff suppressed because it is too large Load Diff