Witam mam problem z obecnym zadaniem. Mianowicie po wprowadzeniu danych wszystko wychodzi poprawnie , natomiast SPOJ nie akceptuje mojego rozwiązania. Czy ktoś mógłby powiedzieć co należy zmienić w kodzie/co zrobiłem źle? Z góry dzięki, poniżej wysyłam kod:
#include
#include <windows.h>
#include <stdio.h>
#include <time.h>
#include
#include
#include
#include <math.h>
using namespace std;
float ile,N,M,t,D=86400;
float R,S=0;
int main()
{
cin>>ile;
for(int i=1;i<=ile;i++)
{
cin>>N>>M;
for(int i=1;i<=N;i++)
{
cin>>t;
R=(D/t)/M;
S=S+R;
S=round(S*100)/100;
}
cout<<ceil(S)<<endl;
S=NULL;
}
return 0;
}
created
last reply
- 1
reply
- 689
views
- 2
users
- 1
like
- 1
link