WA python蒟蒻求助
查看原帖
WA python蒟蒻求助
966040
HAPPY804楼主2024/4/13 06:45
a=input().split()
x=int(a[0])
y=int(a[1])
o=0
for i in range(y+1-x):
    p=x
    if p==2 or p==7 or p==3 or p==5:
        o+=1
    else:
        if p%2!=0 and p%3!=0 and p%5!=0 and p%7!=0:
            o+=1
    p+=1
print(o)
2024/4/13 06:45
加载中...