Loading...
Loading...
Loading...
A cart moves on a floor of R rows and C columns of tiles. It starts at the top-left tile and must reach the bottom-right tile, moving only one tile right or one tile down at a time. Print how many different routes there are.
Example 1
Input
3 3
Output
6
Six routes: choose which 2 of the 4 moves go down.
Example 2
Input
3 7
Output
28
Try the problem first. Open one hint at a time.
A tile is entered from above or from the left, so its count is the sum of those two counts.
The first row and first column have exactly one route each.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor