Stone Division, Revisited

  • + 1 comment

    I don't seem to get it.

    I've downloaded TestCase #1, which includes a test case

    64 5
    2 4 8 16 64
    

    and expects the result to be 29.

    I'd expect that I would divide by all the time.

    Move 1:
    1x64 => 2x32
    Move 2-3:
    2x32 => 4x16
    Move 4-7:
    4x16 => 8x8
    Move 8-15:
    8x8 => 16x4
    Move 16-31:
    16x4 => 32x2
    

    No further moves possible. Makes 31 moves, not 29.

    Where am I wrong?