Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- #include <math.h>
- #include <string>
- #include <algorithm>
- #include <set>
- using namespace ::std;
- int main()
- {
- int basicN, basicC, combN, combT, combC, unlimN, N, combprom;
- int ss,mm, Time=0, j = 1;
- cin >> basicN >> basicC;
- cin >> combN >> combT >> combC;
- cin >> unlimN;
- cin >> N;
- for (int i = 1; i <= N; i++)
- {
- scanf_s("%d:%d", &mm, &ss);
- if (mm != 0)
- {
- if (ss != 0)
- Time = Time + mm + 1;
- else
- Time = Time + mm;
- }
- else
- if (ss > 6 && mm == 0)
- Time = Time + 1;
- }
- combprom = Time - combT;
- if (combprom < 0)
- combprom = 0;
- cout << "Basic: " << basicN + Time*basicC << endl;
- cout << "Combined: " << combN + combC*combprom << endl;
- cout << "Unlimited: " << unlimN;
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment