Блог пользователя YouKnowMeX

Автор YouKnowMeX, история, 2 года назад, По-английски

Hello Everyone,

I was solving problem 1503B - 3-раскраска and my submission is 144772587 getting desired answer on my IDE but getting different answer on CodeForces.

Any solution to fix this?

Полный текст и комментарии »

  • Проголосовать: нравится
  • -2
  • Проголосовать: не нравится

Автор YouKnowMeX, история, 3 года назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • -2
  • Проголосовать: не нравится