Pagini recente » Diferente pentru problema/era intre reviziile 68 si 67 | Cod sursa (job #2706037) | Diferente pentru problema/era intre reviziile 48 si 47 | Cod sursa (job #1591193) | 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;
}