Solves problem 56

Didn't expect it to be so simple.

I'd like to find the nice way to sum all numbers of an integer
This commit is contained in:
2012-10-16 21:46:48 +02:00
parent f1f4da4e8f
commit 1bedcd4c00
3 changed files with 71 additions and 2 deletions

21
e_40.py Normal file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env python
"""
##---
# Julien Lengrand-Lambert
#Created on : 16 - 10 - 2012
#
# DESCRIPTION : Solves problem 40 of Project Euler
An irrational decimal fraction is created by concatenating the positive integers:
0.123456789101112131415161718192021...
It can be seen that the 12th digit of the fractional part is 1.
If d_n represents the nth digit of the fractional part, find the value of the following expression.
d_1 d_10 d_100 d_1000 d_10000 d_100000 d_1000000
##---
"""
if __name__ == '__main__':
print 1
#print "Answer : %d " % (last_ten())