Cod sursa(job #22046)
Utilizator | Capalna Tanase Tase_C | Data | 25 februarie 2007 15:08:50 |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.38 kb |
const litere=['A'..'Z'];
var n:string;
i,l,c:integer;
begin
assign(input,'text.in');reset(input);
assign(output,'text.out');rewrite(output);
readln(n);n:=n+' ';
for i:=1 to length(n) do begin
if (upcase(n[i]) in litere) and (not(upcase(n[i+1]) in litere)) then inc(c);
if upcase(n[i]) in litere then inc(l);
end;
writeln(l div c);
close(input);close(output);
end.