From 1a8e1e68759611a66ae116771da5f376c95a3b9f Mon Sep 17 00:00:00 2001 From: Raphael McSinyx Date: Sun, 12 Feb 2017 16:18:20 +0700 Subject: Update others/volume1 --- others/volume1/018.pas | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'others/volume1/018.pas') diff --git a/others/volume1/018.pas b/others/volume1/018.pas index 05fd7e9..053095c 100644 --- a/others/volume1/018.pas +++ b/others/volume1/018.pas @@ -1,11 +1,12 @@ +uses cmath; + var n: int64; begin readln(n); - if (n < 0) or - (sqr(trunc(sqrt(n))) <> n) then - writeln('NO') - else + if issquare(n) then writeln('YES') + else + writeln('NO') end. -- cgit 1.4.1