摘要: Problem 8: Find the greatest product of five consecutive digits in the 1000-digit number.问题: 找出1000个数字中连续5个数乘积的最大值方法一: 由题意直接写代码:View Code from functools import reducefrom operator import muldef f1(s): l=list(map(int,''.join(s.split('\n')))) return max(reduce(mul,l[i-4:i+1]) for i in 阅读全文
posted @ 2011-05-21 20:40 class 阅读(369) 评论(0) 推荐(0) 编辑