Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int main()
- {
- int t, o, c, d = 86400;
- float czas[100000];
- float suma = 0, wynik = 0;
- cout << "Podaj liczbe testow : ";
- cin >> t;
- for (int i = 0; i < t; i++)
- {
- cout << "Podaj liczbe obzartuchow i ciastek : ";
- cin >> o >> c;
- for (int j = 0; j < o; j++)
- {
- cout << "Podaj czas jedzenia ciastka : ";
- cin >> czas[j];
- czas[j] = floor (((float) d)/czas[j]);
- suma = suma + czas[j];
- wynik = ceil(suma/c);
- }
- cout << "Liczba pudelek : " << wynik << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement