mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
Correction: File solv01.py
I have remove some semicolons.
This commit is contained in:
parent
a5c954ff6e
commit
8d9da8f623
@ -8,11 +8,13 @@ e.g. for n=10, we have {2,8}, sum is 10.
|
||||
'''
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user