fork download
  1. #include <cstdio>
  2. using namespace std;
  3.  
  4. int main(){
  5. int n,k;
  6. double w;
  7. while(scanf("%d%lf%d",&n,&w,&k)==3){
  8. n+=2-(n+2)/k;
  9. printf("%.2f\n",n*w/2+1e-8);
  10. }
  11. }
  12.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty