Ad
  • Custom User Avatar

    My solution was, instead of trying to reverse calculate from m, I just iterated the volumes of m for n=1 up until the test volume was equal or exceeding m. Loop until the test volume is not less, then outside the loop test if the volume encountered was equal vs greater. If equal, return n, else return -1. It works for all but 2 cases, which makes no sense to me, because if I manually reconstruct test1 and testA, my manual calculation comes out with a different answer than the assertion.