Pagini recente » Cod sursa (job #300548) | Cod sursa (job #2860678) | Cod sursa (job #544514) | Cod sursa (job #607757) | Cod sursa (job #743059)
Cod sursa(job #743059)
var i,j,k,l,m,n:longint; c:char; f1,f2:text;
begin
assign(f1,'text.in');
reset(f1);
assign(f2,'text.out');
rewrite(f2);
k:=1;
l:=0;
read(f1,c);
if Not(c in ['a'..'z']) or Not(c in ['A'..'Z']) then begin
repeat
read(f1,c);
until (c in ['a'..'z']) or (c in ['A'..'Z']);
end
else reset(f1);
repeat
read(f1,c);
if (c in ['a'..'z']) or (c in ['A'..'Z']) then Inc(l)
else if (c=' ') or (c='-') then Inc(k);
until eoln(f1);
l:=l+1;
writeln(f2,l div k);
close(f1);
close(f2);
end.