Advertisement
kot_mapku3

1 K

Jun 2nd, 2020
758
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6.   int n,m;
  7.   int x,y;
  8.   int h = 0, w = 0;
  9.  
  10.   cin >> n >> m >> x >> y;
  11.  
  12.   if (n%x != 0) h++;
  13.   h += n/x;
  14.   if (m%y != 0) w++;
  15.   w += m/y;
  16.  
  17.   cout << h*w;
  18.  
  19.   return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement