jainrishab26121's blog

By jainrishab26121, history, 4 months ago, In English

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

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

»
4 months 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}$$$.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Why havn't you delete this yet.

  • »
    »
    4 months 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.