Cod sursa(job #1794925)
| Utilizator | Data | 1 noiembrie 2016 20:39:13 | |
|---|---|---|---|
| Problema | Text | Scor | 40 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.39 kb |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
char s[1024*1024+5],t,*p,sep[]=" ,.-?!;:'({)}";
int i,nr,l;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
gets(s);
p=strtok(s,sep);
while(p!=0){
l+=strlen(p);
nr++;
p=strtok(NULL,sep);
}
printf("%d",l/nr);
return 0;
}
