Skip to content

Instantly share code, notes, and snippets.

@balamark
Created May 2, 2015 05:08
Show Gist options
  • Select an option

  • Save balamark/a5799e0a022ba2a675bf to your computer and use it in GitHub Desktop.

Select an option

Save balamark/a5799e0a022ba2a675bf to your computer and use it in GitHub Desktop.
TCO 2015 round 1A
class Similars:
def maxsim(self, a, b):
return max(map(lambda (i,j):len(set(sorted(str(i))) & set(sorted(str(j)))), [(x,y) for x in range(a,b+1) for y in range(a,b+1) if y>x]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment