Created
November 12, 2018 00:11
-
-
Save june9713/52933d80e44a68bc8910b98f226b284b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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