jainrishab26121's blog

By jainrishab26121, history, 3 weeks ago, In English

EDIT : My query has already been answered, thank you for the help.

  • Vote: I like it
  • +5
  • Vote: I do not like it

»
3 weeks ago, # |
Rev. 2   Vote: I like it +6 Vote: I do not like it

Seems like int overflow in ans -=((x)*(x + 1))/2;

Check the following:

int x=(1<<20); ll ans=x*x; cout<<ans<<'\n';

it outputs 0 instead of $$$2^{40}$$$.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Why havn't you delete this yet.

  • »
    »
    3 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    By delete I meant change the content of the blog, I am not getting an option to completely delete the post.