Pagini recente » Cod sursa (job #2952460) | Cod sursa (job #9597) | Cod sursa (job #2101684) | Cod sursa (job #25895) | Cod sursa (job #809356)
Cod sursa(job #809356)
#include<cstdio>
#include<cstring>
using namespace std;
inline bool litera(char x)
{
if ((x>=97 && x<=122) || (x>=65 && x<=90)) return true;
else return false;
}
inline void citire()
{
char x;
long long s=0,n=0,nr=0;
while (x!='\n')
{
scanf("%c",&x);
if (litera(x)) nr++;
else {s+=nr;
if (nr!=0) n++;
nr=0;
}
}
printf("%lld",s/n);
return;
}
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
citire();
fclose(stdin);
fclose(stdout);
return 0;
}