AKShady Lock

This problem wouldn't have been possible without the help of my friend Akhil Pundir .

Lately he has discovered how to password protect files in phones which doesn't have any support to password protect a file.

Here's his procedure to password protect a file.

  1. He creates 26 folders with names from A to Z .

  2. Then he creates another 26 folders in each of folders he created in step 1 .

  3. He then chooses a 2 letter password and then stores the file he want to password protect by going to the corresponding location. For example, if he chooses his password as BZ then the location of the file stored would be /B/Z .

Using the following trick I have stored a file for you to find out. Find out the file in his memory card and you will get the answer to this problem.

Request and Clarification

  • The given Memory Card file is in rar format. You will need either WinRar or WinZip to extract it.


The answer is 456.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

10 solutions

Thaddeus Abiy
Jun 12, 2014

Nice problem! I wrote a function that recursively looks for the file. It makes use of python's os module.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from os import listdir
from os.path import isfile
def Find_File( Parent_Folder ):
   for File in listdir(Parent_Folder):
     File = Parent_Folder + '\\' + File
      if isfile(File):
         return File
      else: # if it is a folder
         Search_Result = Find_File(File)
         if Search_Result != None:
            return Search_Result
print Find_File("C:\\Memory Card")

The function

1
listdir(Parent_Foler)

returns a list of all things in a folder(files and folders).

The function

1
isfile(file)

checks if a given thing is either a file or a directory.

The function

1
Find_File(Parent_Folder) 

is pretty straight forward,it first checks if the file is in the Parent_Folder. If it is not ,then it recursively checks each sub-directory and returns the path of the file once it is found.

Just check the memory in which folder it has file located The folder having file will have some memory

Pranaav Jain - 6 years, 11 months ago

Log in to reply

I know. But that wouldn't work if there were say 10 levels ..Windows would give up at some point.

Thaddeus Abiy - 6 years, 10 months ago

Log in to reply

Who uses Explorer for that... Total Commander all the way!

Adrian Ly - 6 years, 8 months ago

Nice job there, I love it

If possible, can you compile the code and let everyone download it?

Daniel Lim - 6 years, 11 months ago

Log in to reply

You can actually just download the Python interpreter and run it.

Abhro Rahman - 6 years, 11 months ago

Compiling python code is very complicated..You can just he run it on the interpreter like Abhro said.

Thaddeus Abiy - 6 years, 10 months ago

someone please, reupload to another storage. i can download it from filedopper :( Please

Herbert Sianturi - 6 years, 11 months ago

Log in to reply

Suggest me any other internet storage site which works best for your other than Google Drive and I will upload to that site too. XD

Lokesh Sharma - 6 years, 11 months ago

I just used windows search :D

Me too !!! Perfect method which could come under the heading of "bashing"

Aditya Raut - 6 years, 11 months ago

Lol I did the same

Elijah Chew - 6 years, 12 months ago
Bernardo Sulzbach
Jun 22, 2014

My Python solution

from os import listdir
from string import ascii_uppercase

chars = list(ascii_uppercase)

found = False

for a in chars:
    for b in chars:
        if len(listdir(a + '\\' + b)) != 0:
            found = True
        if found:
            f = open(a + '\\' + b + '\\' + listdir(a + '\\' + b)[0])
            [print(line) for line in f.readlines()]
            break
    if found:
        break
Akshay Nagraj
Jun 19, 2014

This is simple. I just extracted the file and sorted by size. I got L with 102 b and S with 102 b. XD

Shubham Gaikwad
Jun 16, 2014

Just used windows search with . query.

Hahaha! It was never meant to be solved like this. Nice thinking by the way.

Lokesh Sharma - 6 years, 11 months ago
Himanshu Arora
Jun 12, 2014

I used cmd. :( Sort of a cheat.. but still This is the command that will help dir /s /b /o:gn

PS: How do we write the code in a block like in the other comment?

I simply copied it twice to one place and got the answer :P

Daksh Walia - 6 years, 12 months ago

I used windows search with the search criteria being " . " since, it is a file with data, it should come up in the search.

Ori Ashual
Sep 2, 2014

am i the only one who went straight to initials? first i tried A.P. and then L.S.

Bhagirath Mehta
Jun 15, 2014

WinZip sorted the folders and subfolders for me, based on the amount of information inside the folders. LS came up first for me.

Ajay Singh
Jun 15, 2014

I just used the windows search with search string ".txt". txt was a plain guess :D

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...