program ;
var
i, a: longint;
x,
u, j,
n, m : longint;
function fdiv (a, left : longint) : longint;
var
d,
i : longint;
begin
d : = 1;
for i : = left to trunc (sqrt (a)) do
if (a mod i = 0)
then
begin
d : = i;
break;
end;
if (d < > 1)
then
fdiv : = d
else
fdiv : = a;
end;
function g (n, u : longint) : longint;
var
i : longint;
begin
i : = 0;
while (n mod u = 0)
do
begin
inc (i);
n : = n div u;
end;
g : = i;
end;
begin
assign (input, 'input.txt');
assign (output, 'output.txt');
reset (input);
read (a);
close (input);
m : = 0;
n : = 1;
i : = fdiv (a, 2);
u : = 2;
while (a > 1)
do
begin
n : = n * i;
j : = 0;
while (a mod i = 0)
do
begin
inc (j);
a : = a div i;
end;
if (j > m)
then
begin
m : = j;
u : = i;
end;
i : = fdiv (a, i + 2);
end;
x : = 1;
while (g (n * x, u) * n * x < m)
do
inc (x);
n : = n * x;
rewrite (output);
write (n);
close (output);
end.
Поделитесь своими знаниями, ответьте на вопрос:
Сообщение про наушники по информатике .кратко! ( не больше 6-7 предложенй ) !
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
var a: array[0..100,0..100] of integer;
n, m, i, j, max, col: integer;
begin
read(n);
read(m);
for i: =0 to n-1 do
for j: =0 to m-1 do
begin
read(a[i,j]);
if max< a[i,j] then max: =a[i,j];
end;
for i: =0 to n-1 do
for j: =0 to m-1 do
if max=a[i,j] then begin inc(col); break; end;
writeln(col);
for i: =0 to n-1 do
for j: =0 to m-1 do
if max=a[i,j] then begin write(i, ' '); break; end;
end.