27 de julio de 2012

Project Euler 24


#!/usr/bin/env python
from itertools import permutations
from operator import concat
x=permutations("0123456789")
for i in xrange(1,1000000):
    x.next()
print reduce(concat,x.next())