Pagini recente » Istoria paginii utilizator/isabelah | Autentificare | Borderou de evaluare (job #133993) | Diferente pentru problema/bcolor intre reviziile 2 si 14 | Cod sursa (job #170658)
Cod sursa(job #170658)
const m:set of char=['a'..'z','A'..'Z'];
var ct,S,d:longint;
c1:char;
f:text;
begin
assign(f,'text.in'); reset(f);
d:=0;
ct:=0;
s:=0;
while (not eof(f)) do
begin
read(f,c1);
if c1 in m
then
begin
d:=d+1;
inc(S);
end
else
if (d<>0)
then
begin
inc(ct);
d:=0;
end;
end;
close(f);
assign(f,'text.out'); rewrite(f);
if (s=1) and (d=1)
then writeln(f,1)
else
if ct=0 then writeln(f,ct)
else writeln(f,S div ct);
close(f);
end.