Pagini recente » Cod sursa (job #1033446) | Cod sursa (job #1825981) | Cod sursa (job #2431519) | Cod sursa (job #2634465) | Cod sursa (job #666983)
Cod sursa(job #666983)
var n:array[1..100000] of char;
i,s,k,j:integer; f,g:text;
l:integer;
begin
assign(f,'text.in');
assign(g,'text.out');
reset(f);
rewrite(g);
l:=0;
while (not eof(f)) do begin
l:=l+1;
read(f,n[l]);
end;
j:=1;
while not (((n[j] >='a') and (n[j] <='z')) or ((n[j] >='A') and (n[j] <='Z')))
do j:=j+1;
for i:=j to l do
if ((n[i] >='a') and (n[i] <='z')) or ((n[i] >='A') and (n[i] <='Z')) then
k:=k+1 else
if ((n[i+1] >='a') and (n[i+1] <='z')) or ((n[i+1] >='A') and (n[i+1] <='Z'))
then s:=s+1;
s:=s+1;
writeln(g,k div s);
close(f);
close(g);
end.