Решить несколько задач из projecteuler.net
Решения должны быть максимально лаконичными, и использовать list comprehensions.
problem9 - list comprehension : one line
problem6 - list comprehension : one line
problem48 - list comprehension : one line
problem40 - list comprehension : almost oneline :)))
(sum([x for x in range(1,101)]))**2 - sum([x**2 for x in range(1,101)]) # 25164150[(x*y*(x**2 + y**2)**(0.5)) for x in range(400) for y in range(300) if (x+y+(x**2+y**2)**0.5 == 1000 and x != 0 and y != 0] # 31875000sum([x**x for x in range(1,1001)]) % 10000000000 # 9110846700from functools import reduce
reduce(lambda x, y: x * y,[int("".join([str(x) for x in range(10000001)])[10**z]) for z in range(7)]) #210