mirror of
https://github.com/jlengrand/project_euler.git
synced 2026-03-10 00:31:21 +00:00
22 lines
785 B
Python
22 lines
785 B
Python
#!/usr/bin/env python
|
|
'''
|
|
Created on 20 feb. 2012
|
|
|
|
@author: Julien Lengrand-Lambert
|
|
|
|
DESCRIPTION: Solves problem 79 of Project Euler
|
|
A common security method used for online banking is to ask the user for three random characters from a passcode. For example, if the passcode was 531278, they may ask for the 2nd, 3rd, and 5th characters; the expected reply would be: 317.
|
|
|
|
The text file, e_79.data, contains fifty successful login attempts.
|
|
|
|
Given that the three characters are always asked for in order, analyse the file so as to determine the shortest possible secret passcode of unknown length.
|
|
'''
|
|
def shortest():
|
|
"""
|
|
Returns the shortest possible secret passcode of unknown length
|
|
"""
|
|
|
|
|
|
if __name__ == '__main__':
|
|
print "Answer : %d " % (1)
|