Skip to content

Instantly share code, notes, and snippets.

@neale
Last active August 29, 2015 14:20
Show Gist options
  • Save neale/377eeffb0f451ba977ce to your computer and use it in GitHub Desktop.
Save neale/377eeffb0f451ba977ce to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
def answer(x):
len_x = len(x)
sum_x = sum(x)
if sum_x % len_x == 0:
return len_x
else:
return len_x - 1
@neale
Copy link
Author

neale commented Apr 30, 2015

Unbelievable simple

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment