Created
November 22, 2018 03:37
-
-
Save amritghimire/83d54f9a23f0101cb45a1db479c8c752 to your computer and use it in GitHub Desktop.
Solution to Question 2 of i-CES Coding Competition
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
def compute(): | |
ans = sum(x for x in range(1000) if (x % 3 == 0 or x % 5 == 0)) | |
return str(ans) | |
if __name__ == "__main__": | |
print(compute()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment