题目:
题解:
int uniquePaths(int m, int n) {long long ans = 1;for (int x = n, y = 1; y < m; ++x, ++y) {ans = ans * x / y;}return ans;
}
题目:
题解:
int uniquePaths(int m, int n) {long long ans = 1;for (int x = n, y = 1; y < m; ++x, ++y) {ans = ans * x / y;}return ans;
}