Pagini recente » Cod sursa (job #3215015) | Cod sursa (job #2768325) | Cod sursa (job #2457750) | Cod sursa (job #1337912) | Cod sursa (job #373177)
Cod sursa(job #373177)
#include<cstdio>
#include<string>
const int N=1<<27;
char s[N];
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
gets(s);
long long n=strlen(s)-1,nrc=0,lg=0;
for (int i=0;i<=n;i++)
{
int x=(int)s[i];
if ((x>=65 && x<=90) || (x>=97 && x<=122))
{
lg++;
if (i==0)
nrc++;
else
{
int y=(int)s[i-1];
if (y<65 || (y>90 && y<97) || y>123)
nrc++;
}
}
}
printf("%lld",lg/nrc);
return 0;
}