Last active
August 29, 2015 14:20
-
-
Save neale/377eeffb0f451ba977ce to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unbelievable simple