Paths on a Grid
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
You have a piece of paper and you choose a rectangle of size on it. Let's call this rectangle together with the lines it contains a grid. Starting at the lower left corner of the grid, you move your pencil to the upper right corner, taking care that it stays on the lines and moves only to the right or up. The result is shown on the left:
Really a masterpiece, isn't it? Repeating the procedure one more time, you arrive with the picture shown on the right. Now you wonder: how many different works of art can you produce?
Input
Two positive integers and .
Output
Print the number of different art works that can be generated using the procedure described above. You may safely assume that this number fits into a -bit signed integer.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 387
Acceptance rate 59%