Created
November 24, 2011 13:44
-
-
Save LCamel/1391380 to your computer and use it in GitHub Desktop.
a python version ..
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
import random | |
def check(n): | |
for x in range(7): | |
for y in range(x + 1, 7): | |
if (int(n / 49 ** x % 49) == int(n / 49 ** y % 49)): | |
return False | |
return True | |
while True: | |
n = random.randint(0, 49 ** 7 - 1) | |
if (check(n)): | |
break | |
for x in range(7): | |
print n % 49 + 1 | |
n = int(n / 49) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment