题解 | #Fibonacci数列#
Fibonacci数列
https://www.nowcoder.com/practice/18ecd0ecf5ef4fe9ba3f17f8d00d2d66
n = int(input()) a,b = 0,1 res = 999999 while True: a,b = b,a+b res = min(res,abs(b - n)) if b > n: break print(res)
Fibonacci数列
https://www.nowcoder.com/practice/18ecd0ecf5ef4fe9ba3f17f8d00d2d66
n = int(input()) a,b = 0,1 res = 999999 while True: a,b = b,a+b res = min(res,abs(b - n)) if b > n: break print(res)
相关推荐
SHC2:春招先狠狠投递,然后你看看能不能申请香港新加坡的一年制master,花不了多少钱,或者现在赶紧去刷一段实习。HR专业考研没必要