当前位置:网站首页>Programming battle -- challenging college entrance examination questions

Programming battle -- challenging college entrance examination questions

2022-06-11 03:57:00 Youth programming contest communication

Python solution :

a = 1
b = 1
n = 1
while abs(b ** 2 / a ** 2 - 2) >= 0.01:
    b = b + 2 * a
    a = b - a
    n = n + 1
print(n) # 4

Scratch solution :

原网站

版权声明
本文为[Youth programming contest communication]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206110338185906.html