Cod sursa(job #333792)
Utilizator | Data | 23 iulie 2009 21:17:13 | |
---|---|---|---|
Problema | Text | Scor | 90 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.41 kb |
#include<stdio.h>
long long a,z,cuv;
int main()
{ freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
char v;
int a;
while(scanf("%c",&v)==1)
{ if(('a'<=v&&v<='z')||('A'<=v&&v<='Z'))
{
++a;
++z;
}
else if(a!=0)
{
++cuv;
a=0;
}
}
printf("%lld",z/cuv);
return 0;
}