diff options
author | Raphael McSinyx <vn.mcsinyx@gmail.com> | 2017-02-12 16:18:20 +0700 |
---|---|---|
committer | Raphael McSinyx <vn.mcsinyx@gmail.com> | 2017-02-12 16:18:20 +0700 |
commit | 1a8e1e68759611a66ae116771da5f376c95a3b9f (patch) | |
tree | e663fa6adb9264046a876e552ff2a455215c3a8b /others/volume1/030.pas | |
parent | df9a0d140a7b7edef66f95aa13b5bb4488147f68 (diff) | |
download | cp-1a8e1e68759611a66ae116771da5f376c95a3b9f.tar.gz |
Update others/volume1
Diffstat (limited to 'others/volume1/030.pas')
-rw-r--r-- | others/volume1/030.pas | 21 |
1 files changed, 21 insertions, 0 deletions
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. |