Pagini recente » Cod sursa (job #695663) | Clasamentul arhivei de probleme | Cod sursa (job #551597) | Cod sursa (job #2117063) | Cod sursa (job #1400127)
program infoarena1;
var f,g:text;
c:char;
litere,cuvinte,i:longint;
s:string;
bufin,bufout:array[1..66000] of byte;
str,strfinal: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';
//citire
readln(f,strfinal);
while not seekeof(f) do
begin
readln(f,str);
strfinal:=strfinal+str;
end;
i:=1;
while i <= length(strfinal) do
begin
// read(f,c);
if pos(strfinal[i],s) > 0 then
begin
inc(cuvinte);
while pos(strfinal[i],s) > 0 do
begin
inc(litere);
inc(i);
end;
end;
inc(i);
end;
writeln(g,litere div cuvinte);
close(f); close(g);
end.