fork download
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4. int ileprob;
  5.  
  6. int main()
  7. {
  8. cin>>ileprob;
  9. for(int i=0; i<ileprob; i++)
  10. {
  11. int zap, cias;
  12. cin>>zap>>cias;
  13. float suma=0;
  14. for(int i=0; i<zap; i++)
  15. {
  16. float x=0, y;
  17. cin>>y;
  18. x=(86400/y)/cias;
  19. if(x<1)
  20. {
  21. x=0;
  22. }
  23. else{x=ceil(x);}
  24. suma=suma+x;
  25. }
  26. cout<<suma<<endl;
  27. }
  28. return(0);
  29. }
  30.  
  31.  
Success #stdin #stdout 0s 3464KB
stdin
2
2 10
3600
1800
3 356
123
32999
10101
stdout
8
2