Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # python3 '/path/to/Constant_Digit_Scanning.py'
- data = ''
- with open('/path/to/constant.txt') as the_file: data = the_file.read()
- for n in range(1, 15):
- tried = set()
- for i in range(0, len(data)):
- num = data[i:i + n]
- if len(num) != n: exit() # Program has run to the end of the constant
- if num not in tried:
- tried.add(num)
- if len(tried) == 10 ** n:
- print(num)
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement