Skip to content

Instantly share code, notes, and snippets.

@samcv
Created July 10, 2018 20:19
Show Gist options
  • Save samcv/bad6b9ccc8c2facac0e600b4c7285421 to your computer and use it in GitHub Desktop.
Save samcv/bad6b9ccc8c2facac0e600b4c7285421 to your computer and use it in GitHub Desktop.
hash = {}
num = 1000000
for i in range(num):
hash[i] = 1
for j in (2,3,4,5,6):
for i in range(0, num, j):
del hash[i]
for i in range(0, num, j):
hash[i] = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment