Pagini recente » Cod sursa (job #3341226) | Cod sursa (job #3207179) | Cod sursa (job #3339126) | Diferente pentru problema/ctc intre reviziile 7 si 8 | Cod sursa (job #1308749)
#include<stdio.h>
#include<string.h>
#include<ctype.h>
#define NMAX 1<<30
using namespace std;
char s[NMAX],*p;
int main(){
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
int cuv=1;
gets(s);
int n=strlen(s);
for(int i=0;i<strlen(s);++i){
if(s[i]==' ') ++cuv;
if(!isalpha(s[i])) --n;
}
printf("%d\n",n/cuv);
return 0;
}