Pagini recente » Cod sursa (job #1268976) | Cod sursa (job #2223223) | Cod sursa (job #94968) | Cod sursa (job #1135874) | Cod sursa (job #130814)
Cod sursa(job #130814)
var k,c:longint;
m:set of char;
f,g:text;
p:boolean;
uc,ch:char;
begin
assign(f,'text.in');
reset(f);
assign(g,'text.out');
rewrite(g);
c:=0;
k:=0;
m:=['A'..'Z']+['a'..'z'];
uc:=#0;
ch:=#0;
while not eof(f) do
begin
uc:=ch;
read(f,ch);
if (ch in m) then inc(k)
else begin
if (uc in m) and Not(ch in m) then
inc(c);
end;
end;
if ch in m then inc(c);
if (k=0) Or (c=0) then write(g,0)
else write(g,k div c);
close(f);
close(g);
end.