求助,这样写为什么只有70分
查看原帖
求助,这样写为什么只有70分
1470326
bucking_conion楼主2024/11/3 22:18
a = input().split()
c = set()
total = list(range(int(a[0])))
for i in range(int(a[1])):
    b = input().split()
    c.update(list(range(int(b[0]),int(b[1])+1)))
for shan in c:
    total.remove(shan)
count = 0
for y in total:
    count+=1
print(count+1)
2024/11/3 22:18
加载中...