Pagini recente » Cod sursa (job #19734) | Cod sursa (job #106739) | Cod sursa (job #340044) | Cod sursa (job #250092) | Cod sursa (job #1106084)
#include <stdio.h>
#include <string.h>
using namespace std;
char S[1000005];
int LEN,NRLIT,NRCUV;
int main()
{
freopen ("text.in","r",stdin);
freopen ("text.out","w",stdout);
fgets(S,1000005,stdin);
LEN=strlen(S);
int i,ok=0;
for (i=0;i<LEN;i++)
{
if ((S[i]>='a' && S[i]<='z') || (S[i]>='A' && S[i]<='Z'))
NRLIT++,ok=1;
else
if (ok)
{
ok=0;
NRCUV++;
}
}
if (ok) NRCUV++;
int med=NRLIT/NRCUV;
printf("%ld\n",NRLIT/NRCUV);
fclose(stdin);
fclose(stdout);
return 0;
}