Cod sursa(job #1376563)
| Utilizator | Data | 5 martie 2015 17:51:11 | |
|---|---|---|---|
| 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;
}
