Skip to content

Instantly share code, notes, and snippets.

@jay3686
Created February 13, 2012 04:43
Show Gist options
  • Save jay3686/1813749 to your computer and use it in GitHub Desktop.
Save jay3686/1813749 to your computer and use it in GitHub Desktop.
Python Answer to Embedly's Challenge 3
freqWords = map(lambda x : 2520.0 / x, range(1,901))
wordTotal = 0;
wordHalfTotal = sum(freqWords)/2
for wordCount in range(1,901):
wordTotal += freqWords[wordCount - 1];
if wordTotal >= wordHalfTotal:
print wordCount;
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment