Pagini recente » Cod sursa (job #2594864) | Cod sursa (job #2634697) | Autentificare | Cod sursa (job #2634265) | Cod sursa (job #287314)
Cod sursa(job #287314)
Utilizator |
Vlad VLD Vlad2008 |
Data |
24 martie 2009 18:22:37 |
Problema |
Text |
Scor |
0 |
Compilator |
fpc |
Status |
done |
Runda |
aa |
Marime |
0.42 kb |
program VLD4EvEr;
var f,g:text;
s:string;
i,m,n:longint;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
n:=0;
m:=0;
while not(eof(f)) do
begin
readln(f,s);
s:=s+' ';
for i:=1 to length(s)-1 do begin
if s[i] in ['a'..'z','A'..'Z'] then n:=n+1;
if (s[i] in ['a'..'z','A'..'Z']) and (not(s[i+1] in ['a'..'z','A'..'Z'])) then m:=m+1;
end;
writeln(g,n DIV m);
close(f);
close(g);
end.