1
0
Fork 0

thanks reddit. decompiling elfasm is not high on my want-to-do list.

main
Andrew Coleman 2019-01-20 19:28:10 -05:00
parent 0fff0ac276
commit 6175397651
1 changed files with 9 additions and 0 deletions

9
2018/day19/t.py Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env python3
lines = open("input", "r").readlines()
a, b = int(lines[22].split()[2]), int(lines[24].split()[2])
n1 = 836 + 22 * a + b
n2 = n1 + 10550400
for n in (n1, n2):
sqn = int(n ** .5)
print(sum(d + n // d for d in range(1, sqn + 1) if n % d == 0) - sqn * (sqn ** 2 == n))