2 ms·
From what I understand there was no change of base within the solution code. Author just used the base conversion function to prepare some test inputs. "The in
by Karliss 2y ago
From what I understand there was no change of base within the solution code. Author just used the base conversion function to prepare some test inputs.
"The input array must contain a string representations of the numbers. The programmer can use whatever representation they see fit"
Allowing arbitrary string based representation of numbers also means that whole task becomes a bit silly. Why stop at base 15, when you could use what I call the "FizzBuzz" number system.
In fizzbuzz number system the divisibility by 3 and 5 is encoded in first symbols of number. Something like 1="1", 3="F", 5="B", 10="B2", 30="FB2", 1000="B200". Digits represent rest of the number you get after dividing it by 3 and 5 if possible.