20 lines
357 B
Text
20 lines
357 B
Text
var n, count, factor;
|
|
begin
|
|
? n;
|
|
if n < 0 then n := -n;
|
|
count := 0;
|
|
if n >= 2 then
|
|
begin
|
|
factor := 2;
|
|
while factor <= n do
|
|
begin
|
|
while (n / factor) * factor = n do
|
|
begin
|
|
count := count + 1; n := n / factor
|
|
end;
|
|
factor := factor + 1
|
|
end;
|
|
end;
|
|
if count = 2 then ! 1;
|
|
if count <> 2 then ! 0
|
|
end.
|