<em>VAR</em>
<em> ans: Real;</em>
<em> n, i: Integer;</em>
<em>BEGIN </em>
<em> Read(n);</em>
<em> </em>
<em> For i := 1 to n do </em>
<em> ans := ans + (1 / Sqr(i));</em>
<em> </em>
<em> Write(ans);</em>
<em>END.</em>
Используем схему Горнера.
y = x³+2.5x²-x+1 = 1+x(-1+x(2.5+x))
var
x,y:real;
begin
Read(x);
y:=x+2.5;
y:=y*x;
y:=y-1;
y:=y*x;
y:=y+1;
Writeln(y)
end.
Var
x, y: real;
begin
write('x = ');
readln(x);
if (x <= 2) then
y := sqr(x) + 4 * x + 5
else
y := 1 / (sqr(x) + 4 * x + 5);
writeln('F(x) = ', y);
end.
7200 * 8 = 57600 Кбит
<span>57600 / 196,608= ~300 сек = ~5 мин
Ответ: 5 минут</span>
Sub Zadanie()
n = CInt(InputBox("n ="))
for i = 1 to n
t = i
s = 0
Do While t > 0
s = s + (t mod 10)^3
t = t \ 10
Loop
if i=s then MsgBox i
next
End Sub