This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |