Pagini recente » Cod sursa (job #1594129) | Cod sursa (job #1286769) | Cod sursa (job #353708) | Cod sursa (job #2744044) | Cod sursa (job #1276184)
#include <cstdio>
#include <cstring>
using namespace std;
FILE *fin=freopen("text.in","r",stdin);
FILE *fout=freopen("text.out","w",stdout);
char *p, S[10000000], Sep[] = " -!?.,'/><~`@#$%^&*()_+=\}{[];:";
int Len, Nr;
int main()
{
gets(S);
p = strtok(S, Sep);
while( p != NULL )
{
++Nr;
Len += strlen(p);
p = strtok(NULL, Sep);
}
printf("%d", Len / Nr);
return 0;
}