From df9a0d140a7b7edef66f95aa13b5bb4488147f68 Mon Sep 17 00:00:00 2001 From: Raphael McSinyx Date: Sat, 11 Feb 2017 11:37:48 +0700 Subject: Fast and furiously add others/volume1 --- others/volume1/015.pas | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 others/volume1/015.pas (limited to 'others/volume1/015.pas') diff --git a/others/volume1/015.pas b/others/volume1/015.pas new file mode 100644 index 0000000..c9928ef --- /dev/null +++ b/others/volume1/015.pas @@ -0,0 +1,22 @@ +var + n, i: smallint; + a: array of longint; + min, min_: longint; + +begin + readln(n); + min := 1000000000; + setlength(a, n); + for i := 0 to n - 1 do + begin + read(a[i]); + if a[i] < min then + min := a[i] + end; + min_ := 1000000000; + for i := 0 to n - 1 do + if (a[i] < min_) and + (a[i] > min) then + min_ := a[i]; + writeln(min, ' ', min_) +end. -- cgit 1.4.1