mirror of
https://github.com/jlengrand/project_euler.git
synced 2026-03-10 08:41:20 +00:00
commit before going to bed
This commit is contained in:
1
e_40.py
1
e_40.py
@@ -19,3 +19,4 @@ d_1 d_10 d_100 d_1000 d_10000 d_100000 d_1000000
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print 1
|
print 1
|
||||||
#print "Answer : %d " % (last_ten())
|
#print "Answer : %d " % (last_ten())
|
||||||
|
|
||||||
|
|||||||
4
e_56.py
4
e_56.py
@@ -19,9 +19,7 @@ def sum_numbers(val):
|
|||||||
"""
|
"""
|
||||||
Given an value, returns the sum of all its numbers
|
Given an value, returns the sum of all its numbers
|
||||||
"""
|
"""
|
||||||
temp = str(val)
|
return sum(map(int,str(val)))
|
||||||
res = sum([int(i) for i in temp])
|
|
||||||
return res
|
|
||||||
|
|
||||||
|
|
||||||
def sum_pow(max_a, max_b=None):
|
def sum_pow(max_a, max_b=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user