fork(1) download
  1. #include <iostream>
  2. #include <math.h>
  3.  
  4. using namespace std;
  5.  
  6. float w[10], t, q=0;
  7. long long z;
  8. int x, y;
  9.  
  10. int main()
  11. {
  12. cin>>x;
  13. for (int i=0; i<=x; i++)
  14. {
  15. cin >> y >> z;
  16.  
  17. for (int j=0; j<y; j++)
  18. {
  19. w[j] = 0;
  20. cin >> w[j];
  21. t = 86400 / w[j];
  22. w[j] = t/z;
  23. q += w[j];
  24. }
  25. float n = roundf(q * 100) / 100;
  26. q = (ceil( n ));
  27. cout<<q<<endl;
  28. q = 0;
  29. }
  30. return 0;
  31. }
  32.  
Success #stdin #stdout 0s 3472KB
stdin
2
2 10
3600
1800
3 356
123
32999
10101
stdout
8
2
inf