namespace _01_test{ class Program { static void Main(string[] args) { int m, k = 0; m = Convert.ToInt32(Console.ReadLine()); while (Math.Pow(4, ++k) < m); Console.WriteLine(k-1); } } }
Const n=10; m=5; var a:array[1..n,1..m+1] of integer; i,j,k,sp,s:integer; begin Randomize; writeln(' Результаты соревнований'); for i:=1 to n do begin s:=0; for j:=1 to m do begin a[i,j]:=random(50)+50; write(a[i,j]:4); s:=s+a[i,j]; end; a[i,m+1]:=s; writeln(s:5); end; write('k='); readln(k); sp:=0; for i:=1 to n do if a[i,m+1]>=k then sp:=sp+1; writeln('sp=',sp); end.
namespace _01_test{
class Program
{
static void Main(string[] args)
{
int m, k = 0;
m = Convert.ToInt32(Console.ReadLine());
while (Math.Pow(4, ++k) < m);
Console.WriteLine(k-1);
}
}
}