var a,b: integer;
f: text;
begin
assign(f,'input.txt');
reset(f);
read(f,a);
read(f,b);
close(f);
assign(f,'output.txt');
rewrite(f);
if frac(sqrt(a*b))=0 then write(f,trunc(sqrt(a*b)))
else write(f,0);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
var a,b: integer;
f: text;
begin
assign(f,'input.txt');
reset(f);
read(f,a);
read(f,b);
close(f);
assign(f,'output.txt');
rewrite(f);
if frac(sqrt(a*b))=0 then write(f,trunc(sqrt(a*b)))
else write(f,0);
close(f);
end.