Pagini recente » Istoria paginii runda/rar15/clasament | Cod sursa (job #1142529) | Cod sursa (job #1485873) | Cod sursa (job #823762) | Cod sursa (job #316901)
Cod sursa(job #316901)
program text;
var s:string;
j,i,n:integer;
p,q:boolean;
begin
assign(input,'text.in');
assign(output,'text.out');
reset(input);
rewrite(output);
readln(input,s);
i:=1;
j:=0;
n:=0;
while i<>length(s)+1 do
begin
p:=((s[i]>='a')and(s[i]<='z'))or((s[i]>='A')and(s[i]<='Z'));
q:=not(((s[i+1]>='a')and(s[i+1]<='z'))or((s[i+1]>='A')and(s[i+1]<='Z')));
if p then j:=j+1 ;
if (p and q)or(p and (i=length(s))) then n:=n+1;
i:=i+1;
end;
n:=j div n;
writeln(output,n);
close(input);
close(output);
end.