jprm2's blog

By jprm2, history, 6 weeks ago, In English,

for this problem Your text to link here... but while checking on other compilers and judges output is as required by the judge see the test 7 is 666010979 443570624148538441 but on my personal compilers the output is same as required by the judge... that is.. 886507301. Completely inaware of this situation please help what is the bug here in my code or in judges.

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

»
6 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Please help sooner..

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

Mostly negative and out of bounds indices of arrays account for such issues. Check for them.

  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    include

    using namespace std;

    int main() { int n,x,y ; cin>>n >>x >>y ; cout<<(n*y)-(n*x);

    return 0;

    } what is the wrong here

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

      probably overflow. try with int64 or long long.