Skip to content

Instantly share code, notes, and snippets.

@divmgl
Created March 24, 2017 00:16
Show Gist options
  • Save divmgl/4832fd5250fb3e353600caab92aa098a to your computer and use it in GitHub Desktop.
Save divmgl/4832fd5250fb3e353600caab92aa098a to your computer and use it in GitHub Desktop.
Codility.com PermMissingElem 100%/100%
def solution(A):
total = sum(A)
diff = sum(range(1, len(A) + 2))
return abs(diff - total)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment