Pagini recente » Cod sursa (job #895633) | Cod sursa (job #2355015) | Cod sursa (job #304137) | Cod sursa (job #1368048) | Cod sursa (job #1794962)
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
char s[1024*1024*10], t, *p, sep[]=" `~1!2@3#4$5%6^7&8*9(0)-_=+[{]}'|,<.>/?";
int i;
long long nr, l;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
fgets(s, 1024*1024*10, stdin);
s[strlen(s) - 1] = '\0';
p=strtok(s, sep);
while(p!=NULL){
//printf("%s\n", p);
l+=strlen(p);
nr++;
p=strtok(NULL, sep);
}
//printf("%lld %lld\n", l, nr);
printf("%lld",l*1LL/nr);
return 0;
}