program var s: string; a:array[1..4] of integer; i:integer; begin read(s); for i:=1 to 4 do a[i]:=0;
for i:=0 to length(s) do begin if s[i]=')' then inc(a[1]); if s[i]='(' then inc(a[2]); if s[i]='!' then inc(a[3]); if s[i]='.' then inc(a[4]); end;
if(a[1]>a[2])and(a[1]>a[3])and(a[1]>a[4]) then write('Funny')else if(a[2]>a[1])and(a[2]>a[3])and(a[2]>a[4]) then write('Sad') else if(a[3]>a[2])and(a[3]>a[1])and(a[3]>a[4]) then write('Angry') else if(a[4]>a[2])and(a[4]>a[3])and(a[4]>a[1]) then write('Deep') else write('Unclear');
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.
var
s: string;
a:array[1..4] of integer;
i:integer;
begin
read(s);
for i:=1 to 4 do a[i]:=0;
for i:=0 to length(s) do
begin
if s[i]=')' then inc(a[1]);
if s[i]='(' then inc(a[2]);
if s[i]='!' then inc(a[3]);
if s[i]='.' then inc(a[4]);
end;
if(a[1]>a[2])and(a[1]>a[3])and(a[1]>a[4]) then write('Funny')else
if(a[2]>a[1])and(a[2]>a[3])and(a[2]>a[4]) then write('Sad') else
if(a[3]>a[2])and(a[3]>a[1])and(a[3]>a[4]) then write('Angry') else
if(a[4]>a[2])and(a[4]>a[3])and(a[4]>a[1]) then write('Deep') else
write('Unclear');
end.
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.
=)