Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MarmaladeKnight/bebbc008d6bf2f129df0d02b4b762146 to your computer and use it in GitHub Desktop.
Save MarmaladeKnight/bebbc008d6bf2f129df0d02b4b762146 to your computer and use it in GitHub Desktop.
Танина задача
var
value, i, pow :integer;
function func(a, b: integer): integer;
var index: integer;
begin
index := 0;
while (a mod b = 0) do
begin
a := a div b;
index := index + 1;
end;
func := index;
end;
begin
readln(value);
for i := 2 to value div 2 do
begin
pow := func(value, i);
if pow <> 0 then
writeln(i, ' в степени ', pow);
end;
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment