Cod sursa(job #565547)
| Utilizator | Data | 27 martie 2011 21:41:28 | |
|---|---|---|---|
| Problema | Text | Scor | 80 |
| Compilator | cpp | Status | done |
| Runda | gr_4 | Marime | 0.52 kb |
#include <cstdio>
#include <cstring>
#include <cctype>
using namespace std;
FILE *fin=freopen("text.in","r",stdin);
FILE *fout=freopen("text.out","w",stdout);
int main()
{
char s[1000000];
int nrc=0,l=0;
while(!feof(stdin))
{
gets(s);
int lg=strlen(s);
for(int i=0;i<lg;i++)
{
if(isalpha(s[i])){
l++;
if(!isalpha(s[i+1]))
nrc++;
}
}
}
printf("%d",l/nrc);
return 0;
}
