ProjectEuler/Problem_015.py

17 lines
531 B
Python
Raw Permalink Normal View History

2018-10-11 22:09:05 +02:00
2018-10-11 21:35:26 +02:00
######################################################################
# Starting in the top left corner of a 2×2 grid, and only being able to
# move to the right and down, there are exactly 6 routes to the bottom right corner.
#
#
# How many such routes are there through a 20×20 grid?
#
######################################################################
# Look at Pascal's triangle ;)
2018-10-11 21:44:47 +02:00
# Every row with an odd amount of number contains the solution to any n-sided grid.
2018-10-11 21:35:26 +02:00
2018-10-11 21:44:47 +02:00
# This triangle is weird
# Solution: 137846528820