Cod sursa(job #325446)
| Utilizator | Data | 20 iunie 2009 15:51:53 | |
|---|---|---|---|
| Problema | Text | Scor | 30 |
| Compilator | c | Status | done |
| Runda | Arhiva de probleme | Marime | 0.49 kb |
#include <stdio.h>
#include <string.h>
int cuv=-1,lg=-1,i=1,n;
char s[100000];
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
gets(s);
n=strlen(s);
while(i<=n)
{
while(!((s[i]>='a' && s[i]<='z') || (s[i]>='A' && s[i]<='Z'))) i++;
while((s[i]>='a' && s[i]<='z') || (s[i]>='A' && s[i]<='Z'))
{
lg++;
i++;
}
cuv++;
}
printf("%d",lg/cuv);
return 0;
}
