# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
18496 | eaststar | 맛있는 과자 (kriii3_A) | C++14 | 0 ms | 1192 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |