Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- int proby;
- cin >> proby;
- int *obzartuchy = new int[proby];
- float *w_pudelku = new float[proby];
- float *suma = new float[proby];
- for (int i = 0; i < proby; i++)
- {
- cin >> obzartuchy[i];
- cin >> w_pudelku[i];
- float *czasy = new float[obzartuchy[i]];
- for (int j = 0; j < obzartuchy[i]; j++)
- {
- cin >> czasy[j];
- suma[i] += floor(86400.0 / czasy[j]);
- }
- }
- for (int i = 0; i<proby; i++)
- {
- int liczba = ceil(suma[i] / w_pudelku[i]);
- cout << liczba << endl;
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement