Help me with this problem.

Правка en2, от YouKnowMeX, 2021-03-30 09:17:40

Please help me solving this problem I am not getting any idea for this.

Problem ->

Given a number N , consider all whole numbers ≤ N , ie, (0,1,…,N) . Find the sum of the bitwise AND of all consecutive numbers.

For example, the bitwise AND of 5= 101 and 7= 111

(5&7)=( 101 & 111 )=101 =5

Since this sum can very large, print the final answer modulo 109+7

(Note: Be careful of overflows while dealing with large numbers.)

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский YouKnowMeX 2021-03-30 09:17:40 363
en1 Английский YouKnowMeX 2021-03-30 09:15:16 161 Initial revision (published)