|
|
back to boardWhat's wrong in calculating total time? Posted by mai7 2 Mar 2008 03:30 double tt(int x) { double mt=(u*(n-x)>(k-1)*v+15)?u*(n-x):((k-1)*v+15); return mt+5.0+(x-1)*v; } and after calculation x, that gives the best result, i comparse this to (n-1)*u [situation, when it's optimal to go by foot to first floor]. Edited by author 02.03.2008 04:01 Edited by author 02.03.2008 04:01 Re: What's wrong in calculating total time? Be careful in the precision of Double Re: What's wrong in calculating total time? Posted by mai7 3 Mar 2008 03:02 Thanx, I've corrected it |
|
|