Cod sursa(job #570081)
Utilizator | Dragan Andrei Gabriel dragangabriel | Data | 2 aprilie 2011 14:48:52 |
---|---|---|---|
Problema | Text | Scor | 20 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.41 kb |
program tex;
var f,g:text;
c:string[255];
n,i,j,k,p:longint;
begin
assign(f,'text.in');
reset(f);
assign(g,'text.out');
rewrite(g);
readln(f,c);
j:=0;
for i:=1 to length(c) do begin
case c[i] of
'a'..'z':begin inc(k); if (c[i-1]=' ') or (c[i-1]='-') then inc(j); end;
'A'..'Z':begin inc(k); if (c[i-1]=' ') or (c[i-1]='-') then inc(j); end;
end;
end;
writeln(g,k div j);
close(f);
close(g);
end.