Skip to content

Instantly share code, notes, and snippets.

@june9713
Created November 12, 2018 00:11
Show Gist options
  • Save june9713/52933d80e44a68bc8910b98f226b284b to your computer and use it in GitHub Desktop.
Save june9713/52933d80e44a68bc8910b98f226b284b to your computer and use it in GitHub Desktop.
import random
f = 0
st = {}
for i in range(10000):
st[i] = 0
for i in range(10000):
a = random.randint(1,6)
if a == 1:
st[f] += 1
f = 0
else:
f+=1
cnt = 0
for j in range(999 , -1 , -1):
if st[j] > 0:
cnt = j
break
for j in range(cnt+1):
print(j , st[j])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment