Skip to content

Instantly share code, notes, and snippets.

@davidawad
Created August 16, 2014 02:52
Show Gist options
  • Save davidawad/d5fb9f0a51060890f223 to your computer and use it in GitHub Desktop.
Save davidawad/d5fb9f0a51060890f223 to your computer and use it in GitHub Desktop.
Solution to project Euler #1 on Hackerrank
buff = int(input())
for i in range(0,buff):
curr = int(input())
j=0
sum=0
while j < curr :
if j%3 == 0 or j%5 == 0 :
sum+=j
j+=1
print (str(sum))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment