Submission #18496

#TimeUsernameProblemLanguageResultExecution timeMemory
18496eaststar맛있는 과자 (kriii3_A)C++14
33 / 33
0 ms1192 KiB
#include <stdio.h> #include <math.h> int main(){ int i,n; double a,b,c; long long k,t=1; scanf("%lf%lf%d%lld",&a,&b,&n,&k); if(a>b)c=a,a=b,b=c; for(i=0;i<n;){ if(k<=t)break; k-=t; t=t*(n-i)/(++i); } printf("%.8lf",log(a*b/2)+i*2*log(a)+(n-i)*2*log(b)-n*log(a*a+b*b)); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...