Cod sursa(job #893127)
Utilizator | Data | 26 februarie 2013 13:14:36 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include <cstdio>
#include <string.h>
#include <ctype.h>
long long l,cuv,ok;
char c;
int main ()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&c)==1)
if(isalpha(c)) l++,ok=1;
else if(ok==1) cuv++,ok=0;
printf("%lld",l/cuv);
return 0;
}