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/030.pas | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 others/volume1/030.pas (limited to 'others/volume1/030.pas') diff --git a/others/volume1/030.pas b/others/volume1/030.pas new file mode 100644 index 0000000..95490f2 --- /dev/null +++ b/others/volume1/030.pas @@ -0,0 +1,21 @@ +var + s: ansistring; + +function ispalindrome(s: ansistring): boolean; + var + n, i: int32; + begin + n := length(s); + for i := 1 to n do + if s[i] <> s[n - i + 1] then + exit(false); + ispalindrome := true + end; + +begin + readln(s); + if ispalindrome(s) then + writeln('YES') + else + writeln('NO') +end. -- cgit 1.4.1