Pagini recente » Cod sursa (job #1036859) | Cod sursa (job #2835406) | Cod sursa (job #2827090) | Cod sursa (job #1048646) | Cod sursa (job #1376941)
program infoarena1;
var f,g:text;
c:char;
litere,cuvinte,i:longint;
s:string;
bufin,bufout:array[1..66000] of byte;
str:ansistring;
begin
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
settextbuf(f,bufin);
settextbuf(g,bufout);
litere:=0; cuvinte:=0;
s:='QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm';
readln(f,str);
// while not seekeof(f) do
i:=1;
while i <= length(str) do
begin
// read(f,c);
if pos(str[i],s) > 0 then
begin
inc(cuvinte);
while pos(str[i],s) > 0 do
begin
inc(litere);
inc(i);
end;
end;
inc(i);
end;
writeln(g,litere div cuvinte);
close(f); close(g);
end.