Pagini recente » Cod sursa (job #561016) | Cod sursa (job #2878243) | Cod sursa (job #2725116) | Cod sursa (job #2539490) | Cod sursa (job #1516787)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char s[1000005];
int n, nrcuv, lg;
int main()
{
int i;
fin.getline(s,1000005);
lg=0;
n=strlen(s);
for(i = 0; s[i]; i++)
{
if((s[i]>= 'a' && s[i] <= 'z') || (s[i] >= 'A' && s[i] <= 'Z') || (s[i] >= '0' && s[i] <= '9'))
{
while((s[i]>= 'a' && s[i] <= 'z') || (s[i] >= 'A' && s[i] <= 'Z') || (s[i] >= '0' && s[i] <= '9'))
{
lg++;
i++;
}
nrcuv++;
}
}
fout<<lg/nrcuv<<"\n";
fout.close();
return 0;
}