<p>我想解决<a href="http://projecteuler.net/problem=25" rel="nofollow">this problem</a>:</p>
<blockquote>
<p>The 12th term, F<sub>12</sub>, is the first term to contain three digits.</p>
<p>What is the first term in the Fibonacci sequence to contain 1000
digits?</p>
</blockquote>
<pre><code>check = True
mylst = [1,1]
i = 1
while check:
if len(str(mylst[i])) >= 1000:
check = False
else:
mylst.<a href="https://www.cnpython.com/list/append" class="inner-link">append</a>(mylst[i-1] + mylst[i-2])
i=i+1
a =str((mylst[len(mylst)-1]))
print(len(a))
print(a)
</code></pre>
<p>我似乎得到了测试用例2和3的正确答案,但我的答案没有被接受。请帮帮我,我不明白出了什么问题。在</p>