last in binary one after another, with no separators and no leading zeros, producing one long string of zeros and ones.
Read that string as a binary number and return its value modulo 10⁹ + 7.last=2 → 6
In binary, 1 is 1 and 2 is 10. Glued together they give 110, which is 6.
last=5 → 1765
1 + 10 + 11 + 100 + 101 = 11011100101, which is 1765.
last=1 → 1
Just 1, so the answer is 1.
last ≤ 10⁵last=2
6
Run checks the first 3 tests in your browser. Submit checks all 31 tests on the server, hidden ones included.