Pagini recente » Cod sursa (job #187673) | Cod sursa (job #491952) | Cod sursa (job #2028730) | Cod sursa (job #3213742) | Cod sursa (job #809366)
Cod sursa(job #809366)
#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",(int)s/n);
return;
}
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
citire();
fclose(stdin);
fclose(stdout);
return 0;
}