- 8


렠 next k

k< Nmo N := k-1 if k < N then N = k-1

return

N , , .

⻠ ostatok: '

'

-⠠ restore osts

k = 1 N 렠 for k = 1 to N

meue(tv(k),c(k),p(k)) read tv$(k),c(k),p(k)

tv(k) = 䠠 if tv$(k) = then exit for

(tv(k),c(k),p(k)) ? tv$(k);c(k);p(k)

렠 next k

k < N mo N := k-1 if k < N then N = k-1

return

, , :

軠 vyruch: '

'

S := 0 S = 0

k = 1 N 렠 for k = 1 to N

S := S+(c(k)-s(k)) *(m(k)-p(k)) S = S+(c(k)-s(k))*(m(k)-p(k))

렠 next k