Pagini recente » Cod sursa (job #1307341) | Cod sursa (job #697532) | Cod sursa (job #1576984) | Cod sursa (job #2205331) | Cod sursa (job #45095)
Cod sursa(job #45095)
{
Problema text
}
Program text;
Const multime = ['a'..'z','A'..'Z'];
Var k : char;
lt, nrc, oldl : int64;
Begin
Assign( input, 'text.in' );
Reset( input );
k := ' ';
nrc := 0;
lt := 0;
While not eof do
Begin
While (not ( k in multime )) and (not eof) do read( k );
oldl := lt;
While k in multime do
Begin
lt := lt+1;
if eof then break;
read( k );
End;
if oldl<>lt then nrc := nrc+1;
End;
Close( input );
Assign( output, 'text.out' );
Rewrite( output );
If nrc > 0 then Writeln( lt div nrc ) else Writeln( 0 );
Close( output );
End.