Cod sursa(job #980047)
Utilizator | Data | 3 august 2013 19:58:07 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.45 kb |
#include<stdio.h>
#include<ctype.h>
#include<string.h>
char s[1000005];
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
unsigned n,i,m=0,l=0;
bool t;
gets(s);
n=strlen(s);
for(i=0;i<n;i++)
{
t=0;
while(isalpha(s[i]))
{
i++;
l++;
t=1;
}
if(t)
m++;
}
printf("%u\n",l/m);
return 0;
}