fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int h,w,d,s,v;
  5. scanf("%d%d%d",&h,&w,&d);
  6. s = 2 * (h*w + w*d + h*d);
  7. v = h*w*d;
  8. printf("%d %d",s,v);
  9. return 0;
  10. }
  11.  
Success #stdin #stdout 0s 5320KB
stdin
103
43
231
stdout
76310 1023099