2018-10-11 20:09:05 +00:00
|
|
|
|
|
2018-10-11 19:35:26 +00: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 19:44:47 +00:00
|
|
|
|
# Every row with an odd amount of number contains the solution to any n-sided grid.
|
2018-10-11 19:35:26 +00:00
|
|
|
|
|
2018-10-11 19:44:47 +00:00
|
|
|
|
# This triangle is weird
|
|
|
|
|
|
|
|
|
|
# Solution: 137846528820
|