Cod sursa(job #1376146)

Utilizator Burbon13Burbon13 Burbon13 Data 5 martie 2015 16:16:25
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.49 kb
#include <cstdio>
#include <cctype>

using namespace std;

void solve()
{
    int cuv = 0 , l = 0 ;
    char c , ant ;
    while ( scanf( "%c" , &c ) != -1 )
    {
        if ( isalpha(c) )
        {
            l ++ ;
            if ( not isalpha(ant) )
                cuv ++ ;
        }
        ant = c ;
    }
    printf( "%d\n" , l / cuv ) ;
}

int main()
{
    freopen( "text.in" , "r" , stdin ) ;
    freopen( "text.out" , "w" , stdout ) ;
    solve() ;
    return 0;
}