#include<stdio.h> #include<math.h> int main() { int n; double m,M; scanf("%lf%d",&m,&n); m=pow(0.5,n)*m; if(n==1) M=1000; else M=(3-pow(0.5,n-2))*1000; printf("%.2lf %.2lf",m,M); return 0; }
Double click to view unformatted code.