Python中文
首页
教程
问答
标签
搜索
登录
注册
值错误: max()参数为空序列 [python 3]
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>计算和后列表是否为空??</p> <pre><code>t = int(input()) while t > 0: n,m=map(int,input().split()) a=map(int,input().split()) l,o=sum(a),max(a) print(l) if ((o * n)-l) == m: print("YES") else: print((o * n)-l) print("NO") t = t-1 </code></pre>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>像这样试试:</p> <pre><code>inputparam='100 2 300' a = [int(i) for i in inputparam.split()] maxNo=max(a) sumno=sum(a) </code></pre>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
如何重塑数组、迭代列的所有行并将重塑后的数组分配给新列?Python/Pandas/Numpy
7 回答
如何重塑数组的形状?
8 回答
如何重塑文本数据以适应keras的LSTM模型
3 回答
如何重塑未对齐的数据集,并使用numpy丢弃剩余数据?
2 回答
如何重塑此数据以使用绘图
10 回答
如何重塑此数据帧?
6 回答
如何重塑此数据集以适应RNN
8 回答
如何重塑没有列的数组?
3 回答
如何重塑测试数据帧,使其维数与训练和预测工作中使用的维数相同?
6 回答
如何重塑系列以在StandardScaler中使用它
1 回答
如何重塑线性回归的数据
1 回答
如何重塑线性回归的数据?
10 回答
如何重塑表格?
5 回答
如何重塑要堆叠的重复宽数据帧?
9 回答
如何重塑输入以放入二维层?
3 回答
如何重塑输入神经网络的三通道数据集
2 回答
如何重塑这个numpy数组
4 回答
如何重塑这个numpy数组以排除“额外维度”?
9 回答
如何重塑这个numpy阵列?
1 回答
如何重塑这个数据帧
10 回答