为啥RE

P1047 [NOIP2005 普及组] 校门外的树

luogu_administrators @ 2024-04-11 20:41:09

l,m = map(int,input().split())
lst = []
for i in range(l):
        lst.append(True)
for i in range(m):
        a,b = map(int,input().split())
        for j in range(a,b+1):
                lst[j] = False
num = 0
for i in range(l):
        if lst[i] == True:
                num += 1
print(num+1)

by zxz114514 @ 2024-07-17 09:35:15

@luogu_administrators 没用过ptython3,但要引用函数


by liuyuxiaozaizai @ 2024-07-23 21:37:42

@luogu_administrators 第一行不对


|