Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/python
- import sys
- from ArcFP import *
- # Author : Arcaed0x (Adrian Nwankwo)
- def fibs(lim):
- n1 , n2 , ns = 1 , 2 , 0
- while True:
- ns = n1 + n2
- if ns <= lim:
- yield ns
- else:
- break
- n1 = n2
- n2 = ns
- filtNums = filter(even, chain( iter([1,2]) ,fibs(4000000)) )
- def main(args):
- print(sum(filtNums))
- if __name__ == '__main__':
- main(sys.argv)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement