states's recent timeline updates
states

states

V2EX member #61742, joined on 2014-05-03 00:01:56 +08:00
states's recent replies
# coding=utf-8
import time


def fibo(num):
x, y, z = 0, 0, 1
yield z
while x < num:
x += 1
y, z = z, y + z
yield z
if __name__=="__main__":
t = time.time()
for i in fibo(100000):
pass
print(time.time() - t)

1.0970628261566162

fibo(100000)这个计算完要 1 秒多,呵呵
Oct 3, 2015
Replied to a topic by pc10201 程序员 在 windows 上用 git 的最佳工具是什么?
用来用去还是 TortoiseGit 简单
你电脑不会是有感染型的病毒吧!!!!
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   789 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 16ms · UTC 20:17 · PVG 04:17 · LAX 13:17 · JFK 16:17
♥ Do have faith in what you're doing.