Pagini recente » Cod sursa (job #3179645) | Cod sursa (job #1293704) | Cod sursa (job #3251067) | Cod sursa (job #1231277) | Cod sursa (job #47386)
Cod sursa(job #47386)
var s:string;
i,tu,p,n:longint;
g:set of char;
t1,t2:text;
begin
assign(t1,'text.in'); reset(t1);
assign(t2,'text.out'); rewrite(t2);
g:=['1'..'9','a'..'z','A'..'Z'];
read(t1,s);
n:=length(s);
i:=1;
if s[i]<>' ' then inc(p);
for i:=1 to n do
begin
if not(s[i] in g) then inc(p);
if (s[i] in g) then inc(tu);
end;
for i:=1 to n do
if (s[i]=',') or (s[i]='!') or (s[i]='.') or (s[i]='?') then p:=p-1;
write(t2,trunc(tu div p));
close(t1);
close(t2);
end.