Pagini recente » Cod sursa (job #1104315) | Cod sursa (job #2553199) | Cod sursa (job #2644500) | Cod sursa (job #1591084) | Cod sursa (job #1460287)
#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);
nrc=0;
nrl=0;
while(!feof(stdin))
{
ok=false;
gets(s+1);
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);
}