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.
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.