Skip to content

Instantly share code, notes, and snippets.

@LCamel
Created November 24, 2011 13:44
Show Gist options
  • Save LCamel/1391380 to your computer and use it in GitHub Desktop.
Save LCamel/1391380 to your computer and use it in GitHub Desktop.
a python version ..
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