Pagini recente » Cod sursa (job #2859113) | Cod sursa (job #966674) | Cod sursa (job #3136320) | Cod sursa (job #2149832) | Cod sursa (job #893078)
Cod sursa(job #893078)
#include <cstdio>
#include <string.h>
long long x,nr;
char *p,s[1048578],sep[]={"- ,.!;_?><12345678890"};
int main ()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
gets(s);
p=strtok(s,sep);
if(strlen(p)) x++,nr+=strlen(p);
while (p)
{
p=strtok(NULL,sep);
if(p==NULL) break;
if(strlen(p)) x++,nr+=strlen(p);
}
printf("%lld",nr/x);
return 0;
}