|
|
If you are getting an error on test 5 then use double instead of float. Если у вас ошибка при 5ом тесте, используйте переменные double вместо float. >>> print(round(0.0)) >>> 0.0 But "The output should contain the required distance in meters rounded to two fractional digits" So don't forget to use string formatting to provide 2 digits after comma Real test case: 5 90 2.50 0.00 try changing the cycle: while(energy > 0.01) to while (energy > 0.00000000001) Maybe this will help you Попробуйте поменять цикл while (energy > 0.01) на while (energy > 0.00000000001) Возможно, это поможет use while (v < 0.01) use while (v < 0.01) Thank u so much... ^_^ Use geometric series. 1 + 1/k + 1/k^2 + ... = 1 / (1 - 1/k) 1. Calculate S 2. Total S = S+S/k+S/k^2+S/k^3.. 1) "after every fall, the kinetic energy of the ball decreases by a factor of K". So if K > 1, that means the energy becomes negative? E_2 = E_1 - E_1*K might be interpreted to be what you mean when you say something decreases by some factor. 2) "Your task is to determine the maximal distance from the point of throwing that the ball can fly." If the ball is pitched straight up, it will fly some maximal distance from the point of throwing before it reaches the ground again. You should probably exactly what you mean. Should it be geometry or physics ??? Edited by author 08.09.2004 19:43 I don't think so. T ~ V^2, assuming that gives ac hmm... i think the same. In each jump energy decreases K times, then (E = mv^2/2) speed decreases sqrt(k) times. But my solution, which assuming that speed descreases k times (not sqrt(k)), got AC... Strange Sorry for my poor English=) No,you are wrong,it's correct. Each time v decreases in sqrt(k) times,but we use Vx*Vy,so it decreases in k times. I agree with you kinetic engergy decreases in K times speed decreases in sqrt(K) times Because E=1/2*m*v^2 Edited by author 05.12.2008 16:28 Nice joke! I can't use constant PI (WA#3), I must used only number 3.1415926535! Good test #3! I thought this test can't be maked. But I was mistaken. :) Read the condition! It's answer for all you questions. It's helped me. :) And maybe helped you. |
|
|