Skip to content

Commit

Permalink
Correction: File solv01.py
Browse files Browse the repository at this point in the history
I have remove some semicolons.
  • Loading branch information
Christian Bender authored Nov 19, 2017
1 parent a5c954f commit 8d9da8f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Project Euler/Problem 02/sol1.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
'''

n = int(raw_input().strip())
i=1; j=2; sum=0
i=1
j=2
sum=0
while(j<=n):
if((j&1)==0): #can also use (j%2==0)
sum+=j
temp=i
i=j
j=temp+i
print sum
print sum

0 comments on commit 8d9da8f

Please sign in to comment.