Daniele Fucini 6b29655330
Add more solutions
Added solutions for problems 21, 22, 23, 24 and 25 both in C and
in python
2019-09-20 11:12:51 +02:00

22 lines
427 B
Python

#!/usr/bin/python3
from itertools import permutations
from timeit import default_timer
def main():
start = default_timer()
perm = list(permutations('0123456789'))
res = int(''.join(map(str, perm[999999])))
end = default_timer()
print('Project Euler, Problem 24')
print('Answer: {}'.format(res))
print('Elapsed time: {:.9f} seconds'.format(end - start))
if __name__ == '__main__':
main()