Cod sursa(job #1089086)
Utilizator | Data | 21 ianuarie 2014 14:51:43 | |
---|---|---|---|
Problema | Text | Scor | 30 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.56 kb |
var a: array[1..10000] of char;
i, n, l, c: integer;
begin
assign(input,'text.in');
reset(input);
assign(output,'text.out');
rewrite(output);
n:=0; l:=0; c:=1;
while not eof do Begin
inc(n);
read(a[n]);
if (a[n] in ['a'..'z', 'A'..'Z']) then
Begin
inc(l);
if a[n-1]=' ' then inc(c);
end;
end;
writeln(l div c);
close(input);
close(output);
end.