def math_question(n,m):
sum=0
count=0
if abs(m)>=abs(n):
for i in range(n,3*abs(m)):
sum+=i
count+=1
if(sum>m):
break
if abs(m)<abs(n):
for i in range(n,3*abs(n)):
sum+=i
count+=1
if(sum>m):
break
return count
try:
while True:
n,m=map(eval,input().split())
if m-n<=10000:
print(math_question(n,m))
except EOFError:
pass
def math_question(n,m):
sum=0
count=0
if abs(m)>=abs(n):
for i in range(n,3*abs(m)):
sum+=i
count+=1
if(sum>m):
break
if abs(m)<abs(n):
for i in range(n,3*abs(n)):
sum+=i
count+=1
if(sum>m):
break
return count
try:
while True:
n,m=map(eval,input().split())
if m-n<=10000:
print(math_question(n,m))
except EOFError:
pass
本人已自行解決