Pagini recente » Cod sursa (job #2417104) | Cod sursa (job #1938975) | Cod sursa (job #2408385) | Diferente pentru problema/bob intre reviziile 3 si 10 | Cod sursa (job #518088)
Cod sursa(job #518088)
#include <stdio.h>
#include <string.h>
const int N=1000000;
char s[N];
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
char *p,sep[]=" .,?![]-:;'+=`~@#$%^&*()_|/><";
int n,nr;
gets(s);
n=0;
nr=0;
p=strtok(s,sep);
while(p)
{
n++;
nr+=strlen(p);
p=strtok(NULL,sep);
}
printf("%d\n",nr/n);
return 0;
}