Sujay_27's blog

By Sujay_27, history, 10 months ago, In English

This is my code-My code . I'm getting signed integer overflow error. I'm getting this error inspite of using long long. Any help would be appreciated. Thanks in advance. Ques link

  • Vote: I like it
  • 0
  • Vote: I do not like it

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

Auto comment: topic has been updated by Sujay_27 (previous revision, new revision, compare).

»
10 months ago, # |
  Vote: I like it +1 Vote: I do not like it

You are multiplying pro with x (1<=x<=10) n times. Worst case for n=1e5 and x=10, pro will be x*x*x*x..n times which is pow(x,n) ie 10 power 100000. It will result in overflow.