Skip to content

Instantly share code, notes, and snippets.

@jayluxferro
Created March 3, 2021 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jayluxferro/04aff34dee1ec1065b261d977e729434 to your computer and use it in GitHub Desktop.
Save jayluxferro/04aff34dee1ec1065b261d977e729434 to your computer and use it in GitHub Desktop.
Cluster size for wireless networks
#!/usr/bin/env python
list = []
def n(i, j):
return (i ** 2) + (j ** 2) - (i * j)
for x in range(1, 11):
for y in range(x + 1):
_n = n(x, y)
try:
list.index(_n)
except:
list.append(_n)
list.sort()
print(list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment