Pagini recente » Cod sursa (job #847165) | Cod sursa (job #533638) | Cod sursa (job #1317753) | Cod sursa (job #3001568) | Cod sursa (job #1376920)
program infoarena1;
var f,g:text;
c:char;
litere,cuvinte:longint;
s:string;
bufin,bufout:array[1..66000] 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 seekeof(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.