Cod sursa(job #45072)

Utilizator Bluedrop_demonPandia Gheorghe Bluedrop_demon Data 31 martie 2007 23:32:09
Problema Text Scor 90
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.81 kb
{
    Problema text
}

Program text;

Const multime = ['a'..'z','A'..'Z'];

Var k : char;
    lt, nrc : int64;

Begin
    Assign( input, 'text.in' );
    Reset( input );
        read( k );
        While (not (k in multime)) and (not eof) do read( k );
        nrc := 0;
        lt := 0;
        While not eof do
            Begin
                While (k in multime) and (not eof) do
                    Begin
                        lt := lt+1;
                        read( k );
                    End;
                nrc := nrc+1;
                While not ( k in multime ) and (not eof) do read( k );
            End;
    Close( input );

    Assign( output, 'text.out' );
    Rewrite( output );
        If nrc > 0 then Writeln( lt div nrc ) else Writeln( 0 );
    Close( output );
End.