1 #include <stdio.h>
 2 #include <stdlib.h>
 3 int main()
 4 {
 5     int T,b,i;
 6     double a,sum;
 7     scanf("%d",&T);
 8     while(T--)
 9     {
10         scanf("%lf %d",&a,&b);
11         sum=a;
12         a=a/2;
13         for(i=2; i<=b; i++)
14         {
15             sum+=a*2;
16             a=a/2;
17         }
18         printf("%.2lf %.2lf\n",sum,a);
19     }
20     return 0;
21 }

 

相关文章:

  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
  • 2021-11-20
  • 2022-01-14
  • 2021-09-24
  • 2021-12-18
相关资源
相似解决方案