Bring problem_30 solution in line with project style guidelines (#2896)

This commit is contained in:
Noah H 2020-10-05 22:51:39 -04:00 committed by GitHub
parent edf2cd2b0c
commit a56e548264
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,9 @@ def digitsum(s: str) -> int:
return i if i == int(s) else 0
def solution() -> int:
return sum(digitsum(str(i)) for i in range(1000, 1000000))
if __name__ == "__main__":
count = sum(digitsum(str(i)) for i in range(1000, 1000000))
print(count) # --> 443839
print(solution())