#include<stdio.h>
int main()
{
long long int h, n;
scanf("%lld %lld", &h, &n);
double s = h;
int i = 1, j = 1;
double H = h;
if (h == 0) {
printf("0.0 0.0");
}
else {
if (n <= 1) {
if (n == 1) printf("33.0 16.5");
else printf("0.0 0.0");
}
else {
while (i < n) {
i++;
s = s + H;
H = H / 2;
}
printf("%.1lf %.1lf", s, H/2);
}
}
}
7-63 高空坠球
最新推荐文章于 2023-11-01 12:26:06 发布