Advertisement
Guest User

Untitled

a guest
Feb 9th, 2015
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. from time import clock
  2.  
  3.  
  4. def hardwork(n):
  5.     a, b = 1, 1
  6.     for i in range(n):
  7.         a, b = b, a + b
  8.     return a
  9.  
  10.  
  11. def main():
  12.     t = clock()
  13.     hardwork(300000)
  14.     print('Time is {}'.format(clock() - t))
  15.  
  16.  
  17. if __name__ == '__main__':
  18.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement