Created
August 16, 2014 02:52
-
-
Save davidawad/d5fb9f0a51060890f223 to your computer and use it in GitHub Desktop.
Solution to project Euler #1 on Hackerrank
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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