|
|
вернуться в форумwhyWA#4 Послано pine9x 31 мар 2008 16:31 var u1, u2, d1, d2: longint; K: real; begin readln(u1, d1, u2, d2); if u1>u2 then write(u1) else begin k:= (u2-u1)/(d1+d2); write(int(k)*d1 +u1 + d1:0:0);end; end. Re: whyWA#4 Check these cases 1 4 2 2 answer: 2 1 3 5 2 answer: 4 Re: 1 4 2 2 answer : 2 I think the answer is 5 because Petr's offer 1 + 4 = 5 driver's offer = 2 - 2 = 0 |
|
|