#K88587. Unique Paths in an N x N Grid
Unique Paths in an N x N Grid
Unique Paths in an N x N Grid
In this problem, you are given an integer (N) representing both the width and height of a square grid. The goal is to determine the number of unique paths from the top-left corner to the bottom-right corner, when you are only allowed to move either down or right at any step. Mathematically, the number of paths can be expressed in closed form as (\binom{2N-2}{N-1}).
For example, if (N = 3), there are 6 unique paths in a 3x3 grid.
inputFormat
The input consists of a single integer (N) ((1 \le N \le 1000)) provided via standard input (stdin).
outputFormat
Output a single integer representing the number of unique paths from the top-left to the bottom-right corner of an (N \times N) grid. The result should be printed to standard output (stdout).## sample
1
1