fork(1) download
  1. #include <iostream>
  2. #include <math.h>
  3.  
  4. using namespace std;
  5.  
  6. int ile_zestawow,N,M,czas;
  7.  
  8. int main()
  9. {
  10. cin >> ile_zestawow;
  11. for(int i=1; i<=ile_zestawow; i++)
  12. {
  13. float ile_ciastek=0;
  14. cin >> N >> M;
  15. for(int i=1;i<=N;i++)
  16. {
  17. cin >> czas;
  18. ile_ciastek+=(24*60*60)/czas;
  19. }
  20. cout << ceil(ile_ciastek/M) << endl;
  21. }
  22. return 0;
  23. }
Success #stdin #stdout 0.01s 5300KB
stdin
2
2 10
3600
1800
3 356
123
32999
10101
stdout
8
2