Tap here to switch tabs
Problem
Submissions

Problem: Concatenation of Consecutive Binary Numbers

med
30 min
Try to solve the Concatenation of Consecutive Binary Numbers problem.

Statement

Given an integer n, return the decimal value of the binary string formed by concatenating the binary representations of all integers from 11 to n in sequential order, modulo 109+710^9 + 7.

Constraints:

  • 1≤1 \leq n ≤105\leq 10^5

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Concatenation of Consecutive Binary Numbers

med
30 min
Try to solve the Concatenation of Consecutive Binary Numbers problem.

Statement

Given an integer n, return the decimal value of the binary string formed by concatenating the binary representations of all integers from 11 to n in sequential order, modulo 109+710^9 + 7.

Constraints:

  • 1≤1 \leq n ≤105\leq 10^5