mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-30 16:31:08 +00:00
32d5c1a9b2
* 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
7 lines
105 B
Python
7 lines
105 B
Python
from __future__ import print_function
|
|
n = 2**1000
|
|
r = 0
|
|
while n:
|
|
r, n = r + n % 10, n // 10
|
|
print(r)
|