Первая
var n,x:integer;
begin
readln(n);
while n <> 0 do begin
x:=x + n mod 10;
n:=n div 10;
end;
if(x mod 2 = 0) then
writeln('true')
else
writeln('false');
end.
Вторая
var x,z,s:integer;
begin
readln(x);
if (x > 99) and (x < 1000) then begin
s:=x;
while s<>0 do begin
z:=z+s mod 10;
s:=s div 10;
end;
if(x*x) = (z*z*z) then
writeln('true')
else
writeln('false');
end
else
writeln('Число должно быть 3-ех значным!');
end.
Третья
Var a,b,c:Real;
Begin
Writeln('Введите a');
Readln(a);
Writeln('Введите b');
Readln(b);
Writeln('Введите c');
Readln(c);
if (a=b) or (a=c) or (b=c) then
writeln ('true')
else
writeln ('false);
end.
Первая
var n,x:integer;
begin
readln(n);
while n <> 0 do begin
x:=x + n mod 10;
n:=n div 10;
end;
if(x mod 2 = 0) then
writeln('true')
else
writeln('false');
end.
Вторая
var x,z,s:integer;
begin
readln(x);
if (x > 99) and (x < 1000) then begin
s:=x;
while s<>0 do begin
z:=z+s mod 10;
s:=s div 10;
end;
if(x*x) = (z*z*z) then
writeln('true')
else
writeln('false');
end
else
writeln('Число должно быть 3-ех значным!');
end.
Третья
Var a,b,c:Real;
Begin
Writeln('Введите a');
Readln(a);
Writeln('Введите b');
Readln(b);
Writeln('Введите c');
Readln(c);
if (a=b) or (a=c) or (b=c) then
writeln ('true')
else
writeln ('false);
end.
2) 60
def the_quickest_document_transfer_method(net_v, doc_size, zip_ratio, zip_time, unzip_time)
mA = doc_size * (1 - zip_ratio/100) * 1024**2 * 8 / net_v + zip_time + unzip_time
mB = doc_size * 1024**2 * 8.0 / net_v
return [(mA-mB).abs, mA, mB]
end
p the_quickest_document_transfer_method(2**20, 600, 20.0, 2, 1)
mC = 60 * 1024**2 * 8.0 * (1.0/2**20 + 1.0/2**23) - 10 * 60
p mC