Advertisement
Ahmed_Negm

Untitled

Dec 6th, 2021
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include<iostream>
  2. #include<iomanip>
  3. #include<cmath>
  4. #include <algorithm>
  5. using namespace std;
  6. void Ahmed_Negm(){
  7.   #ifndef ONLINE_JUDGE  
  8.     freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
  9.   #endif
  10. }
  11. int main()
  12. {Ahmed_Negm();
  13.  
  14. double n, k, kiwi, blue, straw, res;
  15. cin>>n>>k;
  16. kiwi = (n*2)/k;
  17. blue = (n*5)/k;
  18. straw = (n*8)/k;
  19. res = ceil(kiwi) + ceil(blue) + ceil(straw);
  20. cout<<res;
  21.  
  22.  
  23.  
  24.  
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement