Pagini recente » Cod sursa (job #116800) | Cod sursa (job #951628) | Cod sursa (job #1669129) | Cod sursa (job #1576983) | Cod sursa (job #1181014)
var i, j, k, nr, n :integer;
a:array[1..800] of integer;
buf1:array[1..1 shl 17] of char;
begin
assign(input,'nrtri.in');
reset(input);
Assign(output,'nrtri.out');
rewrite(output);
Settextbuf(input,buf1);
Readln(n);
For i:=1 to n do
read(a[i]);
For i:=1 to n do
For j:=i+1 to n do
For k:=j+1 to n do
begin
if (a[i]+a[j]>=A[k]) and (a[k]+a[j]>=A[i]) and (a[i]+a[k]>=A[j]) then
inc(nr);
end;
write(nr);
close(input);
close(output);
end.