def ming(a):
two = a.split()
s = int(two[0])
tmp = 1
lst = []
while sum(lst) <= int(two[1]):
lst.append(s + tmp)
tmp += 1
return tmp - 1
while 1:
try:
n = input()
print(ming(n))
except:
break
請各位幫我看一下哪裡錯,謝謝!!
def ming(a):
two = a.split()
s = int(two[0])
tmp = 1
lst = []
while sum(lst) <= int(two[1]):
lst.append(s + tmp)
tmp += 1
return tmp - 1
while 1:
try:
n = input()
print(ming(n))
except:
break
我的自己試都可以
但是在第四個測資:
您的答案為: 200 正確答案為: 202
請各位幫我看一下哪裡錯,謝謝!!
沒關係! 解決了