Cod sursa(job #22681)
Utilizator | Rusu Robert asu_the_best | Data | 27 februarie 2007 08:37:07 |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.5 kb |
const litere=['A'..'Z','a'..'z'];
cif=['0'..'9'];
var a,b:char;
i,n,nrl,nrc:longint;
begin
//assign(input,'text.in'); reset(input);
//assign(output,'text.out'); rewrite(output);
read(a);
while not eoln() do begin
read(b);
if a in litere then begin
inc(nrl);
if (not (b in litere))and(not(b in cif)) then inc(nrc);
end;
a:=b;
end;
if (b in litere) then begin inc(nrl); inc(nrc);end;
write(nrl div nrc);
//close(input); close(output);
end.