Pagini recente » Cod sursa (job #889295) | Cod sursa (job #2733175) | Cod sursa (job #1590041) | Cod sursa (job #572587) | Cod sursa (job #1401729)
program infoarena1;
var f,g:text;
c:char;
litere,cuvinte:longint;
s:string;
bufin,bufout:array[1..660000] of byte;
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';
while not eof(f) do
begin
read(f,c);
if pos(c,s) > 0 then
begin
inc(cuvinte);
while pos(c,s) > 0 do
begin
inc(litere);
read(f,c);
end;
end;
end;
writeln(g,litere div cuvinte);
close(f); close(g);
end.