https://leetcode.com/problems/unique-paths/
来源:互联网 发布:淘宝网怎么卖闲置 编辑:程序博客网 时间:2024/06/15 08:56
https://leetcode.com/problems/unique-paths/
不知道说什么
小学排列组合的奥术题
一瞬间不知道怎么计算机解了
不知道脑子里的排列组合应该算思考还是算作弊
import mathclass Solution: # @param m, an integer # @param n, an integer # @return an integer def uniquePaths(self, m, n): a=math.factorial(m+n-2) b=math.factorial(m-1) c=math.factorial(n-1) return a/(b*c)
0 0
- https://leetcode.com/problems/unique-paths/
- https://leetcode.com/problems/candy/
- https://leetcode.com/problems/sqrtx/
- https://oj.leetcode.com/problems/majority-element/
- https://leetcode.com/problems/longest-common-prefix/
- https://leetcode.com/problems/pascals-triangle/
- https://leetcode.com/problems/powx-n/
- https://leetcode.com/problems/reverse-integer/
- https://leetcode.com/problems/plus-one/
- https://leetcode.com/problems/palindrome-number/
- https://leetcode.com/problems/permutation-sequence/
- https://leetcode.com/problems/climbing-stairs/
- https://leetcode.com/problems/divide-two-integers/
- https://leetcode.com/problems/add-binary/
- https://leetcode.com/problems/add-two-numbers/
- https://leetcode.com/problems/merge-sorted-array/
- https://leetcode.com/problems/first-missing-positive/
- https://leetcode.com/problems/spiral-matrix/
- ios适配问题的几个链接
- shell正则摘要
- Meta Property=og标签
- Android学习之 WebView使用小结
- Invalid asset name supplied的原因
- https://leetcode.com/problems/unique-paths/
- CentOS 设置静态IP 方法
- 单点登陆
- QT TcpServer模型搭建及实现
- 黑马程序员——java 泛型
- 第六届蓝桥杯省赛试题--垒骰子 解题报告
- PHP接口类interface的正确使用方法
- Java date format 时间格式化
- Maven配置nexus