Advertisement
Spocoman

Voleyball

Sep 22nd, 2023
1,030
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     string year;
  7.     cin >> year;
  8.  
  9.     double p, h;
  10.     cin >> p >> h;
  11.  
  12.     double game = ((48 - h) * 3 / 4) + h + p * 2 / 3;
  13.  
  14.     if (year == "leap") {
  15.         game *= 1.15;
  16.     }
  17.  
  18.     cout << (int)game << endl;
  19.  
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement