Submission #18495

# Submission time Handle Problem Language Result Execution time Memory
18495 2016-02-06T11:21:41 Z eaststar 맛있는 과자 (kriii3_A) C++14
0 / 33
0 ms 1192 KB
#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("%lf",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
1 Incorrect 0 ms 1192 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -