警示后人(针对Python
查看原帖
警示后人(针对Python
810724
jiguancheng楼主2025/1/24 20:11

题目中第四个测试点格式有问题

用Python直接读取会RE(记录

可以通过循环读取输入避免格式问题

i = []
while True:
    i += list(map(int, input().split()))
    if len(i) >= 2 and len(i) == i[1] + 2:
        break
2025/1/24 20:11
加载中...