Created
December 19, 2018 00:10
-
-
Save resilience-me/726986926389d3de218399eba52caebf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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