fork download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3.  
  4. int main(void) {
  5. // your code goes here
  6. uint32_t n,m,a;
  7. scanf("%d %d %d", &n, &m, &a);
  8.  
  9. if (n%a != 0)
  10. {
  11. n = n/a + 1;
  12. }
  13. else
  14. {
  15. n = n/a;
  16. }
  17. if (m%a != 0)
  18. {
  19. m = m/a + 1;
  20. }
  21. else
  22. {
  23. m = m/a;
  24. }
  25. printf("%d", n*m);
  26.  
  27. return 0;
  28. }
  29.  
Success #stdin #stdout 0s 5296KB
stdin
Standard input is empty
stdout
71154