Skip to content

Instantly share code, notes, and snippets.

@dmitric
Created March 18, 2011 04:51
Show Gist options
  • Save dmitric/875635 to your computer and use it in GitHub Desktop.
Save dmitric/875635 to your computer and use it in GitHub Desktop.
def sum_arithmetic_series(n):
return n*(n+1)/2.0
def missing_one(upto,missing_one):
return sum_arithmetic_series(upto) - sum(missing_one)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment