Created
May 20, 2013 06:56
-
-
Save klen/5610784 to your computer and use it in GitHub Desktop.
This file contains 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
from itertools import product, groupby | |
print sum([len(tuple(g)) ** 2 for _, g in groupby(sorted(map(sum, product(range(10), repeat=3))))]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment