# -*- coding: UTF-8 -*-
import time
start=time.clock()
print 'Hello World!'
def kaka(aa):
if aa%400==0 :
return True
elif aa%100==0:
return False
elif aa%4==0:
return True
else :
return False
def lala(aa):
if ((aa %4==0 and aa%100 != 0 ) or (aa%400==0)) :
return True
else:
return False
for kk in range(100,120):
for i in range(2000,3000):
kaka(i)
#lala(i)
print 'Hello World 558 !'
t=(time.clock()-start)
print t
'''
Hello World!
Hello World 444 !
0.001955
Hello World!
Hello World 555 !
0.001726
Hello World!
Hello World 556 !
0.010237
Hello World!
Hello World 557 !
0.013014
'''
不同的闰年算法,速度比
网友评论