Project Euler Problem #13 Python Solution (#935)

* Create text file for numbers

* Create sol2.py

* Pythonic version of Problem #16 solution

* Update sol2.py

* Valid Python code for Python version 2-3

* Update sol2.py
This commit is contained in:
Animesh Singh
2019-07-08 22:28:58 +05:30
committed by John Law
parent 78cd3df3fc
commit 32d5c1a9b2
3 changed files with 111 additions and 0 deletions

View File

@ -0,0 +1,6 @@
from __future__ import print_function
n = 2**1000
r = 0
while n:
r, n = r + n % 10, n // 10
print(r)