Skip to content

Instantly share code, notes, and snippets.

@pyrofolium
Last active June 10, 2020 19:57
Show Gist options
  • Save pyrofolium/f5a213b8217e4a8c5865c7141d7bd8d6 to your computer and use it in GitHub Desktop.
Save pyrofolium/f5a213b8217e4a8c5865c7141d7bd8d6 to your computer and use it in GitHub Desktop.
def find_pairs(array1: List[int], array2: List[int], x: int, y: int) -> int:
return len([(i,j) for i in array1 for j in array2 if x< i*i + j*j < y])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment