Cod sursa(job #333793)
Utilizator | Data | 23 iulie 2009 21:18:27 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.47 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;
}
}
if(a!=0)
{
a=0;
++cuv;
}
printf("%lld",z/cuv);
return 0;
}