On the sixed day of christmas my true love gave to me Nulltunge™️

This commit is contained in:
2018-12-06 17:58:51 +01:00
parent 35d8889431
commit aa8a858ac2
2 changed files with 17 additions and 1 deletions

14
luke_06/nulltunge.py Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env python3
def main():
total = 0
for i in range(18163106):
zeros = str(i).count('0')
if zeros > len(str(i)) - zeros:
total += i
return total
if __name__ == '__main__':
res = main()
print(res)

View File

@@ -1,2 +1,4 @@
from luke_06.nulltunge import main as nulltunge
def test_answer():
assert False
assert nulltunge() == 78650247070