Glenpl

Untitled

Nov 17th, 2014
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6. int a; //ile zestawow testowych
  7. cin>>a;
  8. int t[a];
  9. for(int i = 0; i < a; i++){
  10. int c,b,d;
  11. cin>>c>>b;
  12. for(int j = 0; j < c; j++){
  13. int h;
  14. cin>>h;
  15. d += 86400/h;}
  16. double ile = d/b;
  17. ile = ceil(ile);
  18. t[i] = (int)ile;}
  19. for(int i = 0; i < a; i++)
  20. cout << t[i] << "\n";
  21. return 0;}
Advertisement
Add Comment
Please, Sign In to add comment