Skip to content

Instantly share code, notes, and snippets.

@resilience-me
Created December 19, 2018 00:10
Show Gist options
  • Save resilience-me/726986926389d3de218399eba52caebf to your computer and use it in GitHub Desktop.
Save resilience-me/726986926389d3de218399eba52caebf to your computer and use it in GitHub Desktop.
# cook your code here
import random
list=[]
bots=[]
duplicate = 0
for i in range(2000):
r=random.randint(1,1000)
if list.count(r) < 2:
list.append(r)
if i % 10 == 0:
bots.append(r)
if bots.count(r) == 2:
duplicate += 1
else:
i -= 1
print(duplicate)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment