407188: GYM102697 159 Maximum Value in Pascal's Triangle
Description
Pascal's Triangle is a famous concept in mathematics, and it has proven to have incredible relevance in many fields of mathematics even hundreds of years after its creation. The triangle is very simple to construct, starting out with just the number one centered on the first line of a sheet of paper. On the second line, write two ones centered just to the left and right of the one above. For any given line on the triangle, a value is found by adding the value to the upper right and upper left of the specified point, even if the upper right or upper left doesn't exist(meaning the specified point is on the edge of the triangle). Values on the edge of the triangle will always be 1. Your task for this problem is to find the maximum value on a given line of pascal's triangle(with the top line being 0).
InputA single integer that represents the line of pascal's triangle(with the top line being 0) to have the maximum found for.
OutputA single integer that represents the maximum value on the given line of Pascal's Triangle.
ExampleInput5Output
10Note
If you are struggling with figuring this task out, take a look at binomial coefficients.