Cod sursa(job #743061)

Utilizator MaarcellKurt Godel Maarcell Data 2 mai 2012 23:28:41
Problema Text Scor 40
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.47 kb
var i,j,k,l,m,n:longint; c,c1:char; f1,f2:text;
begin
assign(f1,'text.in');
reset(f1);
assign(f2,'text.out');
rewrite(f2);
k:=1;
l:=0;
repeat
read(f1,c);
if (c in ['a'..'z']) or (c in ['A'..'Z']) then Inc(l)
else if (Not(c in ['a'..'z']) or Not(c in ['A'..'Z'])) and ((c1 in ['a'..'z']) or (c1 in ['A'..'Z'])) then Inc(k);
c1:=c;
until eoln(f1);
l:=l+1;
if Not(c in ['A'..'Z']) and Not(c in ['a'..'z']) then Dec(k);
writeln(f2,l div k);
close(f1);
close(f2);
end.