procedure cube(a,b,c,d,e:real); Var p,q,delta,phi,i:real; y:array[1..3] of real; begin p:=(3*a*c-sqr(b))/(3*sqr(a)); q:=(2*power(b,3)-9*a*b*c+27*sqr(a)*d)/(27*power(a,3)); delta:=power(q/2,2)+power(p/3,3); if delta<0 then begin if q<0 then phi:=arctan(sqrt(-delta)/(-q/2)); if q>0 then phi:=arctan(sqrt(-delta)/(-q/2))+pi; if q=0 then phi:=pi/2; y[1]:=2*sqrt(-p/3)*cos(phi/3); y[2]:=2*sqrt(-p/3)*cos(phi/3+(2*pi)/3); y[3]:=2*sqrt(-p/3)*cos(phi/3+(4*pi)/3); var x:=seq(y[1]-b/(3*a),y[2]-b/(3*a),y[3]-b/(3*a)); write(x.where(x -> x<>e).where(x -> frac(x)=0).where(x -> x>=0).Where(x -> x<=1000).Distinct.Count); end; if delta>0 then begin var arsom:=range(0,1000).Where(x->(a*power(x,3)+b*x*x+c*x+d)/(x-e)=0); write(arsom.Count); {Мы не виноваты, Паскаль не может в комплексные числа} end; if delta=0 then begin y[1]:=2*power(-q/2,1/3); y[2]:=-power(-q/2,1/3); var x:=seq(y[1]-b/(3*a),y[2]-b/(3*a)); write(x.where(x -> x<>e).where(x -> frac(x)=0).where(x -> x>=0).Where(x -> x<=1000).Distinct.Count); end; end;
procedure square(a,b,c,e:real); Var d:real; begin d:=sqr(b)-4*a*c; if d<0 then writeln('0'); if d>0 then begin var x:=arr((-b+sqrt(d))/(2*a),(-b-sqrt(d))/(2*a)); write(x.where(x -> x<>e).where(x -> frac(x)=0).where(x -> x>=0).Where(x -> x<=1000).Distinct.Count); end; if d=0 then begin var x:=arr(-b/(2*a)); write(x.where(x -> x<>e).where(x -> frac(x)=0).where(x -> x>=0).Where(x -> x<=1000).Distinct.Count); end; end;
procedure common(a,b,e:real); begin var x:=arr(-b/a); write(x.where(x -> x<>e).where(x -> frac(x)=0).where(x -> x>=0).Where(x -> x<=1000).Distinct.Count); end;
procedure awfulvar(e:real); begin if (e>=0) and (e<=1000) then writeln('1000') else writeln('1001'); end;
procedure otherawfulvar(e:real); begin if e<>0 then writeln('1') else writeln('0'); end;
begin read(a,b,c,d,e); if (a<>0) and (b<>0) then cube(a,b,c,d,e); if (a=0) and (b<>0) then square(b,c,d,e); if (a=0) and (b=0) and (c<>0) and (d<>0) then common(c,d,e); if (a=0) and (b=0) and (c=0) and (d=0) then awfulvar(e); if (a=0) and (b=0) and (c<>0) and (d=0) then otherawfulvar(e); if (a=0) and (b=0) and (c=0) and (d<>0) then writeln('0'); end.
Прежде всего хотелось бы отметить,что один Кбайт = 2^13 бит или 8192 бит; 1 байте - 8 бит; 1кбайте - 1024 байта.
1). Два варианта решения : А ). Переведем объем сообщения из кбайт в биты: 2.5 * 2^13 = 20480. Теперь найдем время: 20480/2560 = 8 (мин) Как посчитать без калькулятора: - Сначало представим число 2560 ,как 256 * 10. - дальше представим число 256,как 2^8 ,а число 10 - 2 * 5. Получится такой пример : 2.5*2^13/2^8*2*5 , дальше сокращаем наши двойки со степенями, получится 2.5*2^4/5 , тоесть зная свойства степеней : a^n/a^m= a^n-m , получается 2^13/2^9=2^13-9. Думаю тут все понятно... ну в итоге 2.5*2^4/5 =8 (мин). б). Переведем скорость передачи 2560 из бит в байты : 2560бит/8 = 320 байт,а объем сообщения 2.5 из кбайт в байты : 2.5кбайт * 1024 = 2560 байт. Ну дальше всё просто : 2560/320=8 (мин). 3 ). Объем сообщения переводим из Кбайт в биты тоесть: 225*2^13/14400=128. А вторую задачу тебе правильно решили.
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota
Оформи подписку