fork(2) download
  1. #include <iostream>
  2. #include <cmath>
  3. #include <stdio.h>
  4. using namespace std;
  5. int ile, l, n ;
  6. int N ;
  7. long M ;
  8. int czas [100000] ;
  9. int b ;
  10. int ldd [100000] ;
  11. float f = 0;
  12. int main()
  13. {
  14. cin >> ile ;
  15. for(int i=1; i<=ile; i++ )
  16. {
  17. cin >> N >> M ;
  18. for ( b = 1 ; i <= N ; i++ )
  19. {
  20. cin >> czas [b] ;
  21. ldd[b]=86400/czas[b] ;
  22. f += ldd [b] ;
  23. }
  24. cout << ceil (f / M) ;
  25.  
  26. }
  27.  
  28.  
  29. return 0;
  30. }
Success #stdin #stdout 0s 4240KB
stdin
2
2 10
3600
1800
3 356
123
32999
10101
stdout
8