Skip to content

Commit

Permalink
Avoid unnecessary indexing on euler016 (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranisalt authored Oct 5, 2021
1 parent 032d165 commit 13e56bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion euler0XX/euler016.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
number = str(2 ** 1000)
print(sum(int(number[i]) for i in range(len(number))))
print(sum(int(digit) for digit in number))

0 comments on commit 13e56bb

Please sign in to comment.