|
|
вернуться в форумWrong test or checker,Admins please check I use binary search to solve this problem and had trouble with input this input gots AC: double x; int j,t; fscanf(inf,"%lf",&x); L[i]=(int)(x*100.0+1e-9); but this got WA9 fscanf(inf,"%i.%i",&t,&j); L[i]=t*100+j; output in boyh programs was like this fprintf(outf,"%i.%0.2i\n",ANS/100,ANS%100); possible reasons: 1. input data hasn't 2 digits after decimal point(maybe it have none digits and no point at all) 2. chacker is floating-point written program with do errors and you have to do the same errors to AC. Re: Wrong test or checker,Admins please check this code is wrong fscanf(inf,"%i.%i",&t,&j); L[i]=t*100+j; you must use scanf("%d", &x); instead of scanf("%i", &x); why ? try to input "09" %d reads it as 9, but %i reads some random thing |
|
|