Gravity Centrifuge Tuning is very instructive. I suggest everyone to read the titles of the tests to get a clue.
There is one test that is at odds with the puzzle description though. The “Constraints” section states that “N > 0”, but the “Wait, what?” test sets N to 0. It’s probably easier to amend the constraint. If you solve it before the text is changed… be aware of that.
Hi, I’m trying to solve this puzzle with javascript,
Any clue how to manage the integer overflow?
Seems there is no BigInt() library (on spidermonkey compiler), how I’m supposed to save N (number of tumbles) like on the last test: "Zeckendorf would be proud of you"?
Even if somehow I managed to work on it’s string representation, and find the binary bitstream (as string), how I can convert the bitstream to octal without overflow?
You are correct that this is much harder in some languages due to the lack of bignum support . For the conversion at the end you can work a single character at a time - every 3 binary bits is one octal character.
Well ok it’s harder (and honestly, why would you use such languages when there are alternatives available? I digress), but I take offense at the “much harder” distinction: if your algorithm is sound, you don’t need any of the “hard” operations, and you can trivially implement them all on a string or bitfield or whatever.
That’s supposed to be way easier than the initial conversion from decimal to your internal representation, whatever it is.