Cod sursa(job #1409117)
Utilizator | Data | 30 martie 2015 13:34:32 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.39 kb |
#include<cstdio>
#include<algorithm>
#include<cstring>
int n,i,l,nrc,ok;
char s,ch;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while (scanf("%c",&s))
{
if ((s<='Z' && s>='A') || ( s<='z' && s>='a' )) l++,ok=1;
else if (ok)
ok=0,nrc++;
if (s=='\n') break;
}
printf("%d",l/nrc);
return 0;
}