- 博客(4)
- 收藏
- 关注
原创 python while实现多行输入
①使用 := 海象运算符while n := input(): print(n)可在表达式内部为变量赋值。Python3.8 版本新增运算符。② 使用try catch捕获一个输入否则break
2022-04-25 16:10:45
1421
原创 python 阶乘函数
import matha = math.factorial(n)应用:快速求组合数 C(a, b)import mathn, m = map(int,input().split())a = math.factorial(n)b = math.factorial(n)print(a// b // b)
2022-03-30 19:43:20
632
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人