shashiHIGS's blog

By shashiHIGS, 14 years ago, In English

i think the answer is (4^n-(1+2.....(2^n-1)))%(10^9+7);but upper bound of n is 10^18; so how to find the answer?

  • Vote: I like it
  • -1
  • Vote: I do not like it

| Write comment?
»
14 years ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

If I am not mistaken the answer is .
You can calculate 4n and 2n using binpow algorithm.