Advertisement
Spocoman

05. Firm

Sep 4th, 2023
661
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.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     int neededHours, days, workers;
  7.     cin >> neededHours >> days >> workers;
  8.  
  9.     int totalHours = days * 0.9 * workers * (8 + 2);
  10.  
  11.     if (neededHours > totalHours) {
  12.         cout << "Not enough time!" << neededHours - totalHours << " hours needed." << endl;
  13.     }
  14.     else {
  15.         cout << "Yes!" << totalHours - neededHours << " hours left." << endl;
  16.     }
  17.  
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement