diff --git a/luke_06/nulltunge.py b/luke_06/nulltunge.py new file mode 100755 index 0000000..d32945b --- /dev/null +++ b/luke_06/nulltunge.py @@ -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) diff --git a/tests/test_luke06.py b/tests/test_luke06.py index 376886c..dfb0f0b 100644 --- a/tests/test_luke06.py +++ b/tests/test_luke06.py @@ -1,2 +1,4 @@ +from luke_06.nulltunge import main as nulltunge + def test_answer(): - assert False + assert nulltunge() == 78650247070