Cod sursa(job #287355)
Utilizator | Vlad VLD Vlad2008 | Data | 24 martie 2009 19:42:22 |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.42 kb |
program VLD4EvEr;
var f,g:text;
s:string;
i,m,n:longint;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
n:=0;
m:=0;
while not(eof(f)) do
begin
readln(f,s);
s:=s+' ';
for i:=1 to length(s)-1 do begin
if s[i] in ['a'..'z','A'..'Z'] then n:=n+1;
if (s[i] in ['a'..'z','A'..'Z']) and (not(s[i+1] in ['a'..'z','A'..'Z'])) then m:=m+1;
end;
writeln(g,n DIV m);
close(f);
close(g);
end.