mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-28 07:21:07 +00:00
Correction: File solv3.py
I have remove some semicolons. line 11, 12 and 42
This commit is contained in:
parent
567f2adab8
commit
a5c954ff6e
|
@ -8,8 +8,8 @@ Find the sum of all the multiples of 3 or 5 below N.
|
||||||
This solution is based on the pattern that the successive numbers in the series follow: 0+3,+2,+1,+3,+1,+2,+3.
|
This solution is based on the pattern that the successive numbers in the series follow: 0+3,+2,+1,+3,+1,+2,+3.
|
||||||
'''
|
'''
|
||||||
n = int(raw_input().strip())
|
n = int(raw_input().strip())
|
||||||
sum=0;
|
sum=0
|
||||||
num=0;
|
num=0
|
||||||
while(1):
|
while(1):
|
||||||
num+=3
|
num+=3
|
||||||
if(num>=n):
|
if(num>=n):
|
||||||
|
@ -39,4 +39,4 @@ while(1):
|
||||||
if(num>=n):
|
if(num>=n):
|
||||||
break
|
break
|
||||||
sum+=num
|
sum+=num
|
||||||
print sum;
|
print sum
|
||||||
|
|
Loading…
Reference in New Issue
Block a user