Cod sursa(job #595284)
| Utilizator | Data | 11 iunie 2011 19:53:49 | |
|---|---|---|---|
| Problema | Text | Scor | 10 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.46 kb |
#include <stdio.h>
char v[10001];
int main()
{
int k=0,s=0,m=0,j=0;
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
k=1;scanf("%c",&v[0]);
while (v[k-1]!=EOF)
{
scanf("%c",&v[k++]);
if ((int)v[k-1]>64 && (int)v[k-1]<123) ++s;
else if ((int)v[k-2]>64 && (int)v[k-2]<123)
{
++m;
j+=s;
s=0;
}
}
printf("%d",j/m);
return 0;
}
