Pagini recente » Cod sursa (job #633090) | Cod sursa (job #848535) | Cod sursa (job #283640) | Cod sursa (job #1046973) | 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;
}