var b,c,f,n,g:longint;
a:array[1..1000] of boolean;
d:integer;
begin
readln(n);
b:=0;
fillchar(a,sizeof(a),false);
for f:=1 to n do
begin
read(c);
if not a[c] then begin a[c]:=true;inc(b);end;
end;
writeln(b);
for f:=1 to 1000 do
if a[f] then write(f,' ');
readln
end.
var
i,j,m,k,c,s,n:longint;
a,b:array[1..100]of longint;
t,f:boolean;
begin
readln(n);
for i:=1 to n do
read(a[i]);
for i:=1 to n do
begin
t:=true;
m:=a[i];
for j:=i+1 to n do
if a[j]=m then
t:=false;
if t=true then
begin
s:=s+1;
b[s]:=a[i];
end;
end;
for i:=1 to s-1 do
for j:=i+1 to s do
if b[i]>b[j] then
begin
c:=b[i];
b[i]:=b[j];
b[j]:=c;
end;
writeln(s);
for i:=1 to s do
write(b[i],' ');
end.
x,i,count,n:longint;
begin
readln(n);
fillchar(a,sizeof(a),#0);
for i:=1 to n do
begin
read(x);
if not a[x] then begin a[x]:=true; inc(count); end;
end;
writeln(count);
for i:=1 to 1000 do
if a[i] then write(i,' ');
writeln;
end.
x,i,count,n:longint;
begin
readln(n);
fillchar(a,sizeof(a),#0);
for i:=1 to n do
begin
read(x);
if not a[x] then begin a[x]:=true; inc(count); end;
end;
writeln(count);
for i:=1 to 1000 do
if a[i] then write(i,' ');
writeln;//klklklklklklklklklklklklklklklllllllllllllllllllllllllllllllllllllllllllfgfgfg
end.
x,i,count,n:longint;
begin
readln(n);
fillchar(a,sizeof(a),#0);
for i:=1 to n do
begin
read(x);
if not a[x] then begin a[x]:=true; inc(count); end;
end;
writeln(count);
for i:=1 to 1000 do
if a[i] then write(i,' ');
writeln;//klklklklklklklklklklklklklklklllllllllllllllllllllllllllllllllllllllllllfgfgfg
end.
x,i,count,n:longint;
begin
readln(n);
fillchar(a,sizeof(a),#0);
for i:=1 to n do
begin
read(x);
if not a[x] then begin a[x]:=true; inc(count); end;
end;
writeln(count);
for i:=1 to 1000 do
if a[i] then write(i,' ');
writeln;//klklklklklklklklklklklklklklklllllllllllllllllllllllllllllllllllllllllllfgfgfg
end.
x,i,count,n:longint;
begin
readln(n);
fillchar(a,sizeof(a),#0);
for i:=1 to n do
begin
read(x);
if not a[x] then begin a[x]:=true; inc(count); end;
end;
writeln(count);
for i:=1 to 1000 do
if a[i] then write(i,' ');
writeln;//klklklklklklklklklklklklklklklllllllllllllllllllllllllllllllllllllllllllfgfgfg
end.
readln(n,r);
p:=maxlongint; sum:=0;
for i:=1 to n do
begin
read(x);
if x<p then p:=x;
inc(sum,x);
end;
readln;
while sum mod p > 0 do dec(p);
writeln((sum div p) - n,' ',p);
if p>r then write('T') else write('F');
readln;
end.
readln(n,r);
p:=maxlongint; sum:=0;
for i:=1 to n do
begin
read(x);
if x<p then p:=x;
inc(sum,x);
end;
readln;
while sum mod p > 0 do dec(p);
writeln((sum div p) - n,' ',p);
if p>r then write('T') else write('F');
readln;
end.
i,j,d,k,c,s,n:longint;
a,b:array[1..100]of longint;
q,f:boolean;
begin
readln(n);
for i:=1 to n do
read(a[i]);
for i:=1 to n do
begin
q:=true;
d:=a[i];
for j:=i+1 to n do
if a[j]=d then
q:=false;
if q=true then
begin
s:=s+1;
b[s]:=a[i];
end;
end;
for i:=1 to s-1 do
for j:=i+1 to s do
if b[i]>b[j] then
begin
c:=b[i];
b[i]:=b[j];
b[j]:=c;
end;
writeln(s);
for i:=1 to s do
write(b[i],' ');
end.