Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
from random import*
d={}
a=l=n=p=0
for i in range(100):
d[i]=0
while n<100:
a+=1
p=randint(0,99)
if p==50:
l=0
else:
l=1
if d[p]==0:
d[p]=1
n+=1
print(a)
##Python 3, 164 bytes, aka garbage :)
from random import*
d={}
a=l=n=p=0
for i in range(100):
d[i]=0
while n<100:
a+=1
p=randint(0,99)
if p==50:
l=0
else:
l=1
if d[p]==0:
d[p]=1
n+=1
print(a)
Python 3, 164 bytes, aka garbage :)
from random import*
d={}
a=l=n=p=0
for i in range(100):
d[i]=0
while n<100:
a+=1
p=randint(0,99)
if p==50:
l=0
else:
l=1
if d[p]==0:
d[p]=1
n+=1
print(a)
from random import*
d={}
a=l=n=p=0
for i in range(100):
d[i]=0
while n<100:
a+=1
p=randint(0,99)
if p==50:
l=0
else:
l=1
if d[p]==0:
d[p]=1
n+=1n+=1print(na)
##Python 3, 164 bytes, aka garbage :)
from random import*
d={}
a=l=n=p=0
for i in range(100):
d[i]=0
while n<100:
p=randint(0,99)
if p==50:
l=0
else:
l=1
if d[p]==0:
d[p]=1
n+=1print(n)
##Python 3, 164 bytes, aka garbage :)
from random import*
d={}
a=l=n=p=0
for i in range(100):
d[i]=0
while n<100:
a+=1
p=randint(0,99)
if p==50:
l=0
else:
l=1
if d[p]==0:
d[p]=1
n+=1
print(a)