Cod sursa(job #470785)
Utilizator | Data | 15 iulie 2010 15:51:17 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.48 kb |
program text1;
var t:string;
cuv:array[1..250] of string;
c,i,j,l:longint;
f1,f2:text;
begin
assign(f1,'text.in');reset(f1);
assign(f2,'text.out');rewrite(f2);
read(f1,t);
for i:=1 to length(t) do
t[i]:=upcase(t[i]);
j:=1;
for i:=1 to length(t) do
if (t[i] in ['A'..'Z']) then cuv[j]:=cuv[j]+t[i]
else j:=j+1 ;
c:=j;
for i:=1 to j do
if length(cuv[i])<>0 then l:=l+length(cuv[i]) else c:=c-1;
write(f2,trunc(l/c));
close(f1);
close(f2);
end.