python写的过不了
查看原帖
python写的过不了
1652723
QVQ_q楼主2025/1/23 00:50
T=int(input())
for _ in range(T):
    L,R=map(int,input().split())
    c=R-2*L
    if(c<0):
        print(0)
    else :
        print(int((c+2)*(c+1)/2))

用C++写的就过了,这个用python写的哪里不对吗=.=怎么过不了

2025/1/23 00:50
加载中...