Pagini recente » Cod sursa (job #306382) | Cod sursa (job #2314185) | Cod sursa (job #1224683) | Cod sursa (job #2140049) | Cod sursa (job #1460286)
#include<cstdio>
#include<cstring>
using namespace std;
char s[2000002];
int nrc,nrl,n,i;
bool ok;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
gets(s+1);
ok=false;
nrc=0;
nrl=0;
n=strlen(s+1);
for(i=1;i<=n;i++)
{
if((s[i]>='a'&&s[i]<='z')||(s[i]>='A'&&s[i]<='Z'))
{
if(ok==false)
{
ok=true;
nrc++;
}
nrl++;
}
else
{
ok=false;
}
}
printf("%d\n",nrl/nrc);
}