Beta

Clock Lock - Save the World, Time Traveler! :)

Description:

You traveled back from the future to save the world. You must get a password to prevent a nuclear apocalypse.

You have succesfully got into the system by an exploit which was published just in the future. You have access to the checkpwd() method, and with this you can check that a password is valid or not. But unfortunatelly you have limited access to the system and you cannot use the followings:

  • import
  • class
  • the "" and "_" symbols
  • exec
  • eval
  • getattr
  • globals
  • locals
  • dir

Before you traveled back to the past, you got some information about the system:

  • you can use the timeit module
  • the password is a 20 character long hexadecimal string (lowercase)
  • they check the passwords very slowly, character by character. At a wrong character the checkpwd() method immediately returns with False value.

Write a getpwd() function which returns with the correct password. Good Luck!

Note: Measure the time! Maybe better to try your function in your own computer before you try it here. Don't worry if the test fails first time, maybe just the measurements were wrong, try to validate again :)

Security
Algorithms

Similar Kata:

Stats:

CreatedMay 22, 2018
PublishedMay 22, 2018
Warriors Trained87
Total Skips26
Total Code Submissions132
Total Times Completed11
Python Completions11
Total Stars1
% of votes with a positive feedback rating83% of 3
Total "Very Satisfied" Votes2
Total "Somewhat Satisfied" Votes1
Total "Not Satisfied" Votes0
Total Rank Assessments3
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
6 kyu
Ad
Contributors
  • user7807731 Avatar
Ad