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