Cod sursa(job #124703)
| Utilizator | Data | 19 ianuarie 2008 19:08:49 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.52 kb |
Program textul;
Var f:text;
lc,nc,i:longint;
a:array[0..100000] of char;
lit:set of char;
Begin
assign(f,'text.in');
reset(f);
lit:=['a'..'z','A'..'Z'];
lc:=0;
nc:=0;
while(not(EOF(f))) do
begin
inc(i);
read(f,a[i]);
if (a[i] in lit) then
begin
if not(a[i-1] in lit) or (i=1) then inc(nc);
inc(lc);
end;
end;
close(f);
assign(f,'text.out');
rewrite(f);
Writeln(f,lc div nc);
close(f);
End.