Cod sursa(job #22674)
Utilizator | Rusu Robert asu_the_best | Data | 27 februarie 2007 08:29:59 |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.45 kb |
const litere=['A'..'Z','a'..'z'];
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) 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.