Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- int main()
- {
- int day = 24 * 60 * 60, t, N, M, cookies, time;
- std::cin >> t;
- while(t-- != 0)
- {
- cookies = 0;
- std::cin >> N >> M;
- while(N-- != 0)
- {
- std::cin >> time;
- cookies += day / time;
- }
- std::cout << ceil(static_cast<double>(cookies) / M) << "\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement