Блог пользователя vsanjay_nitdgp

Автор vsanjay_nitdgp, история, 8 лет назад, По-английски

Recently,I solved a problem.

This is one of my step in my solution:

ans=ans-(2*b*c[n]);

ans is double variable,b is integer,c[n] is double; my answer was judged wrong.

when i changed the step to

double p=2*b*c[i];
ans=ans-p;

My solution got ACCEPTED.Could anyone say,why this occur,so that it would be very helpful for future problems of this kind.

Thanks.

  • Проголосовать: нравится
  • -21
  • Проголосовать: не нравится