Hi nice puzzle but my tests are failing because of unknown characters
using typescript and String.fromCodePoint(number) method
aprdec returns me value of ƽ which makes return string imposible to be correct
maymay decode 4 52 from number: 44
maymar decode 2 50 from number: 42
aprdec decode ƽ 445 from number: 311
Not sure what your problem is? All can be decoded into valid characters:
maymay => 4 x 12 + 4 = 52 => the character “4”
maymar => 4 x 12 + 2 = 50 => the character “2”
aprdec => 3 x 12 + 11 = 47 => the character “/”
And I have just done the puzzle in TypeScript. All the tests and validators can be passed.
I used parsint(aprdec, base)
445 = parsInt(311, 12)
But i think you opened my eyes but maybe i am wrong
i should convert dec to base of 12 and apr to base of 12 and then sum them up?
3 is treated as the first digit, and 11 is treated as the second digit in the base-12 number.
It’s a bit like how you would interpret hexadecimal numbers.
ParseInt(“93”, 12) gives you 111.
But “311” has to be revised as “3B” as “B” is 11 in base 12.
ParseInt(“3B”, 12) gives you 47.
If you have further questions, please feel free to PM me
A minute of silence (o7) for those who tried to use 10 and 11 instead of A and B? I’m one of them.
But if you think about it, it’s not obvious that you need to use the letters A and B instead of indexes 10 and 11 (and I’ll note that 511 is just as valid as 5B), because we are literally told to combine two indexes together; and only this line hints that you need to use letters:
The string of two months represents a two-digit base 12 number.
and even then it says TWO DIGITS, and I don’t remember when A or B became digits?! And I can only draw one conclusion: the condition is poorly written and intentionally or not misleads the person solving the puzzle and I don’t understand how such a condition could get approved three times(@pshemke@Juanmv94@aymane212)!
P.S. I want to point out that @aymane211 → changed his name to @aymane212
Just like you said, you were expected to convert the months into a valid base 12 number so that you can properly convert them to base 10. As the statement says, ‘two-digit’ — if it’s 3 (101), make it 2 (a1).
int(“101”,12) → 145 → \x{91} int(“a1”,12) → 121 → y
If you don’t, it would yield noticeable weird results anyway. It’s really just a reading problem.
The string of two months represents a two-digit base 12 number.
And, in base 12, “digits” are 0;1;2;3;4;5;6;7;8;9;A;B … as C;D;E;F are “digits” too in hexadecimal.
By the way, there can be a misunderstanding here due to a bad assessment of “digit” term, which should mean here something like “symbol representing a number”, and not “numeral symbol”.
That said, I found the puzzle too “easy” in the sense that the wording was too detailed for my taste. We literally had to code the wording line by line, and I would have appreciated a few more intentional gray areas to stimulate our analysis.
Good plot, though!