Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Fix the Python Syntax Error that is causing LGTM to fail #880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions Project Euler/Problem 01/sol5.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
a=3
result=0
while a=<1000:
if(a%3==0 and a%5==0):
result+=a
elif(a%15==0):
result-=a
print(result)
#!/usr/bin/env python3

"""Find the sum of all the multiples of 3 or 5 below 1000."""

# https://projecteuler.net/problem=1

print(sum(i if 0 in (i % 3, i % 5) else 0 for i in range(1000)))