赞
踩
题目:
题解:
- class Solution {
- public int uniquePaths(int m, int n) {
- long ans = 1;
- for (int x = n, y = 1; y < m; ++x, ++y) {
- ans = ans * x / y;
- }
- return (int) ans;
- }
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。