Pagini recente » Cod sursa (job #2381647) | Cod sursa (job #2689808) | Cod sursa (job #2894233) | Cod sursa (job #389271) | Cod sursa (job #1460296)
#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;
scanf("%s\n",s);
n=strlen(s);
for(i=0;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;
}
}
if(feof(stdin))
{
break;
}
}
printf("%d\n",nrl/nrc);
}