Problem 2438 · Medium

Range Product Queries of Powers

The powers of two that sum to n are its set bits, in increasing order; each query multiplies a contiguous slice of them modulo 1e9 + 7.

Open the interactive visualisation