Skip to content

Instantly share code, notes, and snippets.

@amritghimire
Created November 22, 2018 03:37
Show Gist options
  • Save amritghimire/83d54f9a23f0101cb45a1db479c8c752 to your computer and use it in GitHub Desktop.
Save amritghimire/83d54f9a23f0101cb45a1db479c8c752 to your computer and use it in GitHub Desktop.
Solution to Question 2 of i-CES Coding Competition
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