Cod sursa(job #683839)
| Utilizator | Data | 20 februarie 2012 19:42:45 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.37 kb |
program texte;
var f : text;
n,i,j,k : word;
c : char;
begin
assign(f,'text.in');
reset(f);
n:=0;
j:=0;
k:=0;
repeat
read(f,c);
i:=ord(upcase(c));
if (i<65)or(i>90) then
k:=0
else
begin
n := n + 1;
if k = 0 then
begin
j := j + 1;
k := 1;
end;
end;
until eof(f);
close(f);
assign(f,'text.out');
rewrite(f);
write(f,n div j);
close(f);
end.
end.