I'm stucked ...

Any help would be appreciated

Best regards
DM
Moderator: Board moderators
Code: Select all
100
1
1
1
1
1
2
2
2
2
2
5
5
5
5
5
0
0
0
0
0
0
1
1
1
1
1
55
6
1
4
1
11
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
5
0
0
0
0
0
4
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
Code: Select all
Output for data set 1, 100 bytes:
Time remaining: 95 seconds
Time remaining: 43 seconds
Time remaining: 12 seconds
Time remaining: stalled
Time remaining: 70 seconds
Total time: 27 seconds
Output for data set 2, 6 bytes:
Total time: 3 seconds
Output for data set 3, 11 bytes:
Time remaining: stalled
Time remaining: stalled
Time remaining: stalled
Time remaining: 50 seconds
Time remaining: 45 seconds
Time remaining: 4 seconds
Total time: 34 seconds
Output for data set 4, 1 bytes:
Time remaining: stalled
Time remaining: stalled
Time remaining: 0 seconds
Total time: 15 seconds
What types are remainBytes and transferedBytes ?sjn wrote: [c]remainSecond = remainBytes/(transferedBytes/5.0);
printf("%d seconds\n", ceil(remainSecond)); [/c]
and always got WA by
[c]rate = transferedBytes/5.0;
printf("%d seconds\n", ceill(remainBytes/rate));[/c]
rate is double type
who can tell me why
I noticed it only now... ceil against ceill !!!sjn wrote: [c]printf("%d seconds\n", ceil(remainSecond)); [/c]
[c]printf("%d seconds\n", ceill(remainBytes/rate));[/c]