Var i, a, s: integer;
begin
readln(a);
for i := a to 500 do
s := s + i;
writeln(s);
end.
2)
var i, a, s, c, b: integer;
begin
readln(a, b);
for i := a to b do
begin
s := s + i;
c := c + 1;
end;
writeln(s / c:4:2);
end.
3)
const N=10;
var i, b, s: integer;
a: array [0..N] of integer;
begin
readln(b);
for i := 0 to N do a[i] := random(9000);
for i := 0 to N do
if (a[i] < b) then s := s + i;
for i := 0 to N - 2 do
if (a[i+1] = b) then writeln('(', a[i], '; ', a[i+2], ')');
writeln(s);
end.
=)