about summary refs log tree commit diff
path: root/others/volume1/015.pas
blob: c9928ef06a43e99294c3953abeb7c7cb13ced54f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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.