Cod sursa(job #979254)
Utilizator | Iacob Paul Cristian crysstyan | Data | 1 august 2013 00:53:51 |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.56 kb |
program asdfa;
var s:string;
i,n,t,cuv,r:longint;
f,g:text;
begin
assign(f,'text.in');reset(f);
read(f,s);
close(f);
n:=length(s);
t:=0; cuv:=1;
for i:=1 to n do
begin
if (s[i]=' ') and (s[i+1]<>' ') then
cuv:=cuv+1;
if ((s[i]>='A') and (s[i]<='Z')) or ((s[i]>='a') and (s[i]<='z')) then
t:=t+1;
end;
assign(g,'text.out');
rewrite(g);
r:=t div cuv;
write(g,r);
close(g);
end.