QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#142567#6423. FireworksGuanYunchangCompile Error//C++11500b2023-08-19 12:31:392023-08-19 12:31:41

Details

answer.code: In function ‘long double Get(long long int)’:
answer.code:6:36: error: ‘pow’ was not declared in this scope
    6 |         return min((1.0l*k*n+m)/(1-pow(1-p/10000.0l,k)),1e18l);
      |                                    ^~~
answer.code: In function ‘int main()’:
answer.code:24:30: warning: format ‘%lf’ expects argument of type ‘double’, but argument 2 has type ‘long double’ [-Wformat=]
   24 |                 printf("%.10lf\n",Get(l));
      |                         ~~~~~^    ~~~~~~
      |                              |       |
      |                              double  long double
      |                         %.10Lf
answer.code:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |         scanf("%d",&t);
      |         ~~~~~^~~~~~~~~
answer.code:12:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   12 |                 scanf("%d%d%d",&n,&m,&p);
      |                 ~~~~~^~~~~~~~~~~~~~~~~~~