Pagini recente » Cod sursa (job #439247) | Cod sursa (job #1421924) | Cod sursa (job #2385816) | Cod sursa (job #2841460) | Cod sursa (job #2820699)
#include <bits/stdc++.h>
using namespace std;
int let,word;
char s[10000000];
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
cin.sync_with_stdio(false);
cin.tie(0);
while(cin>>s)
{
char ult=' ';
int n=strlen(s);
for(int i=0; i<n; ++i)
{
if(isalpha(s[i]))
{
let++;
if(!isalpha(ult))word++;
}
ult=s[i];
}
}
cout<<let/word;
return 0;
}