Mai intai trebuie sa te autentifici.
Cod sursa(job #906985)
| Utilizator | Data | 7 martie 2013 15:20:07 | |
|---|---|---|---|
| Problema | Text | Scor | 40 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.69 kb |
program text_infoarena;
type vector=array[1..1 shl 28] of char;
vect=array[1..1000000000] of char;
var intrare,iesire:vector; v:vect;
i,j:longint; x,nrc,nrl:qword;
f,g:text;
function lit(c:char):boolean;
begin
lit:=false;
if ((c>='a')and(c<='z'))or((c>='A')and(c<='Z'))then lit:=true;
end;
begin
assign(f,'text.in');reset(f); settextbuf(f,intrare);
assign(g,'text.out');rewrite(g); settextbuf(g,iesire);
i:=1; nrl:=0; nrc:=0;
while not eoln(f) do
begin
read(f,v[i]);
if lit(v[i])then inc(nrl);
inc(i);
end;
for j:=1 to i do
if lit(v[j])and(not lit(v[j+1])) then inc(nrc);
//writeln(g,nrl,' ',nrc);
x:=nrl div nrc;
writeln(g,x);
close(f); close(g);
end.