fork download
  1. #include<bits/stdc++.h>
  2. #define int long long
  3. using namespace std;
  4. int32_t main()
  5. {
  6. int t=1;
  7. // cin>>t;
  8. while(t--)
  9. {
  10. int x,y,z;
  11. cin>>x>>y>>z;
  12. int x1=0,x2=0;
  13. if(x%z==0)
  14. x1=x/z;
  15. else
  16. x1=(x/z)+1;
  17.  
  18. if(y%z==0)
  19. x2=y/z;
  20. else
  21. x2=(y/z)+1;
  22.  
  23. cout<<x1*x2;
  24. return 0;
  25. }
  26. }
Success #stdin #stdout 0s 5324KB
stdin
Standard input is empty
stdout
1