Cod sursa(job #669760)
| Utilizator | Data | 27 ianuarie 2012 18:20:48 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.45 kb |
program p1;
uses crt;
var s,n:integer;
ok:boolean;
ch:char;
fi,fo:text;
BEGIN
assign(fi,'text.in'); reset(fi);
assign(fo,'text.out'); rewrite(fo);
while not eof(fi) do
begin
read(fi,ch);
if (ch>='a')and(ch<='z')or(ch>='A')and(ch<='Z')
then begin
inc(s);
ok:=true;
end
else if ok then begin inc(n); ok:=false; end;
end;
writeln(fo,s div n);
close(fi); close(fo);
END.