Skip to content

Instantly share code, notes, and snippets.

View Roasbeef's full-sized avatar
🏂
squad up 🏂

Olaoluwa Osuntokun Roasbeef

🏂
squad up 🏂
View GitHub Profile
@Roasbeef
Roasbeef / Pe_16_solution.py
Created March 28, 2012 17:49
Project Euler Problem #16 Solution
#Sum of digits of 2^1000
from functools import reduce
#Solution Number:1
reduce(lambda a,b: a+b, [int(x) for x in str(2**1000)])
#Solution Number:2
sum([int(x) for x in str(2**1000)])