fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. unsigned long n, m, a, width, height;
  6.  
  7. scanf("%lu%lu%lu", &n, &m, &a);
  8. printf("%lu %lu %lu",n,m,a);
  9. if (m % a == 0)
  10. width = m / a;
  11. else
  12. width = m / a + 1;
  13.  
  14. if (n % a == 0)
  15. height = n / a;
  16. else
  17. height = n / a + 1;
  18.  
  19. printf("%lu\n", width * height);
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 1836KB
stdin
Standard input is empty
stdout
3079128464 134513995 30788689802