Pagini recente » Cod sursa (job #3217930) | Cod sursa (job #2927378) | Cod sursa (job #1088247) | Cod sursa (job #1754473) | Cod sursa (job #46359)
Cod sursa(job #46359)
var c,x:char;
nr,m:longint;
begin
assign(input,'text.in');
reset(input);
assign(output,'text.out');
rewrite(output);
read(c);
x:=c;
if (x>='a')and(x<='z')or(x>='A')and(x<='Z') then nr:=1;
while not eof do
begin
read(c);
if (c>='a')and(c<='z')or(c>='A')and(c<='Z') then nr:=nr+1;
if ((x>='a')and(x<='z')or(x>='A')and(x<='Z'))
and not ((c>='a')and(c<='z')or(c>='A')and(c<='Z')) then m:=m+1;
x:=c;
end;
c:=' ';
if (c>='a')and(c<='z')or(c>='A')and(c<='Z') then nr:=nr+1;
if (x>='a')and(x<='z')or(x>='A')and(x<='Z')
and not ((c>='a')and(c<='z')or(c>='A')and(c<='Z')) then m:=m+1;
writeln(nr div m);
close(output);
end.