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/027.pas | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 others/volume1/027.pas (limited to 'others/volume1/027.pas') diff --git a/others/volume1/027.pas b/others/volume1/027.pas new file mode 100644 index 0000000..0b285bd --- /dev/null +++ b/others/volume1/027.pas @@ -0,0 +1,16 @@ +uses cmath; + +var + n: int64; + m: int32; + +begin + readln(n); + m := trunc(sqrt(n)); + if issquare(n) then + writeln(m, ' ', m) + else if n > m * (m + 1) then + writeln(m + 1, ' ', m + 1) + else + writeln(m, ' ', m + 1) +end. -- cgit 1.4.1