Cod sursa(job #340378)
| Utilizator | Data | 14 august 2009 13:58:06 | |
|---|---|---|---|
| Problema | Text | Scor | 60 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.84 kb |
var b,c:char;
t:text;
leng,cuv:int64;
function adevarat(c:char):boolean;
begin
adevarat:=((ord(c)>64)and(ord(c)<91))or((ord(c)>96)and(ord(c)<123));
end;
begin
assign(t,'text.in'); reset(t);
read(t,b);
while not(eof(t)) do begin
while not(eoln(t)) do begin
read(t,c);
if adevarat(c) then inc(leng)
else if adevarat(b) then inc(cuv);
b:=c;
end;
readln(t);
end;
if adevarat(c) then inc(cuv);
close(t);
assign(t,'text.out'); rewrite(t);
writeln(t,(leng div cuv));
close(t);
end.
