Dex
icleus Aug 8, 2015 @ 10:00am
Crash Safe Code (Answer)
Key given:
A = 11
Z = 10


a =11
b =12
c =13
d =14
e =15
f =16
g =17
h =18
i =19
j =20
k =21
l =22
m =23
n =24
o =25
p =26
q =1
r =2
s =3
t =4
u =5
v =6
w =7
x =8
y =9
z =10

answer = 13211318 = crash
< >
Showing 1-9 of 9 comments
Dilfshake Sep 11, 2015 @ 1:59am 
Even with the answer right in front of me I still have no idea how you got it!
The Average Rook Sep 13, 2015 @ 9:36pm 
Well, what was the confusing bit for you?
I did'nt figure it but I understand this. sorry for late post. A to Z in numerical is 1 to 26. so if a is 11, just count the alphabets from 11 to 26 which is P. Q wil be number 1. thanks!
melkathi Apr 26, 2016 @ 7:29am 
Thanks for the solution. I was certain I had to replace the letters with numbers, but the A=11 Z=10 meant nothing to me. Was trying to devide the actual number of the letters with the given number to work out a conversion formula for the rest :P
mooog Jan 27, 2018 @ 2:50pm 
After some trial and error I was able to create a script that solved the passcode.

NOTE: The script should run in Python 3.XX



"""
HINT FROM GAME:
A=11
Z=10


The script uses an integer base and the remainder function (%) to create a mapping that can be used to convert a cypher word into an integer representation needed to open the safe.

Frustratingly, there are TWO working solutions to this problem. Base 26 AND base 13. Both evaluate A as 11 and Z as 10... However, the resulting numbers do not work in practice because they only amount to 6 digits, where the safe requires 8 digits.


BASE 13: 0, 2, 11, 3, 5 (NOT WORKS)
BASE 26: 13, 2, 11, 3, 18 (WORKS)

"""
INTEGER_BASE = 26
VALUE_OF_A = 11

alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
b11seq = [
i % INTEGER_BASE
for i in range(VALUE_OF_A, VALUE_OF_A + 26)
]
decoder = dict(zip(alpha, b11seq))
print(decoder)


def decode_letter(ch):
return decoder[ch.upper()]


def decode_phrase(phrase):
for ch in phrase:
print(decode_letter(ch))


# VERIFY THAT THE ASSUMPTIONS ARE TRUE (PROGRAM WILL CRASH IF DECODER FAILS TESTS)
assert decode_letter("a") == 11
assert decode_letter("z") == 10

# DECODE THE PHRASE
decode_phrase("crash")


mooog Jan 27, 2018 @ 3:10pm 
Possibly of interest side note related to the code above.


My girlfriend didn't like how it counts starting at 0, in programming you start counting at 0 in pretty much any language. This fact causes a lot of programmers to run into the infamous "off by 1" when they are noobies. I thought it was interesting that it worked either way for this cypher since it didn't contain the letter P. P can be 0 or 26, it doesn't matter. I didn't want to spend too much time rewriting the code, but here's a tweak that would shift the count from 0:25 to 1:26. It works either way but I thought others might be interested.

INTEGER_BASE = 26
VALUE_OF_A_MINUS_1 = 10

alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
b11seq = [
i % INTEGER_BASE + 1
for i in range(VALUE_OF_A_MINUS_1, VALUE_OF_A_MINUS_1 + 26)
]
The Average Rook Jan 27, 2018 @ 4:26pm 
It's strange to think that a simple pattern this hint applies to would entice someone to create a script in Python to manufacture the cypher.

Doesn't anyone read Graeme Base?
mooog Jan 28, 2018 @ 4:52pm 
Do you even code bro?
♥♥♥♥♥♥♥ degenerates.. why would these ♥♥♥♥♥ imitate binary code in the first place..
< >
Showing 1-9 of 9 comments
Per page: 1530 50