Advertisement
dmkozyrev

a.cpp

Apr 25th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. typedef int64_t Int;
  6.  
  7. int main() {
  8.     Int k, n, s, p;
  9.     cin >> k >> n >> s >> p;
  10.     // p - в одной пачке
  11.     // s - самолетиков из одного листа
  12.    
  13.     // Сколько нужно листов одному человеку?
  14.     Int need_one = (n + s-1) / s;
  15.     // Сколько нужно пачек всем людям?
  16.     Int need_all = (need_one * k + p - 1) / p;
  17.     std::cout << need_all << std::endl;
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement