fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int main()
  5.  
  6. {
  7. unsigned int ile=0,lo=0,lp=0;
  8. unsigned int c[10000];
  9. unsigned int wynik=0;
  10.  
  11.  
  12.  
  13. cin>>ile;
  14.  
  15. for (int i=1;i<=ile;i++)
  16.  
  17. {
  18.  
  19. cin>>lo>>lp;
  20. for (int i=0;i<=(lo-1);i++)
  21.  
  22. {
  23.  
  24. cin>>c[i];
  25. wynik+=(86400/c[i]);
  26.  
  27. }
  28. wynik/=lp;
  29. if (wynik%lp!=0)
  30.  
  31. {
  32. wynik++;
  33. }
  34.  
  35. cout<<wynik<<endl;
  36. }
  37. return 0;
  38.  
  39. }
  40.  
Success #stdin #stdout 0s 3472KB
stdin
5
1 1
3600
1 1
3600
1 1
3600
1 1
3600
1 1
3600
stdout
24
48
72
96
120