Pagini recente » Cod sursa (job #1240968) | Cod sursa (job #2255128) | Cod sursa (job #2152170) | Cod sursa (job #706674) | Cod sursa (job #678044)
Cod sursa(job #678044)
program text_infoarena;
type sir = array[1..100000] of char;
var a:sir;
i,n:longint;
f:text;
lungime,nr_cuvinte:integer;
begin
assign(f,'text.in'); reset(f);
i:=1;
while not eof(f) do
begin
read(f,a[i]);
inc(i);
end;
close(f);
n:=i-1;
for i:=1 to n do begin
a[i]:=upcase(a[i]);
if not (a[i] in ['A'..'Z','0'..'9']) then a[i]:=' ';
end;
nr_cuvinte:=0;
lungime:=0;
for i:=1 to n do begin
if (a[i] in ['A'..'Z','0'..'9']) then inc(lungime) else inc(nr_cuvinte);
end;
writeln (lungime div nr_cuvinte+1);
readln;
end.