Pagini recente » Cod sursa (job #1883598) | Cod sursa (job #93469) | Infoarena Monthly 2014 - Clasament | Cod sursa (job #1258154) | Cod sursa (job #2213929)
#include<fstream>
using namespace std;
ifstream cin("text.in");
ofstream cout("text.out");
char pars[2000000];
bool elitera(char x)
{
if(('a'<=x && x<='z') || ('A'<=x && x<='Z')) return 1;
return 0;
}
int main()
{
cin.get(pars,2000000);
int c=0,nrc=0,nrl=0;
for(int i=0;pars[i]!=0;i++)
if(elitera(pars[i]))
{
++nrl;
if(c==0)
{
c=1; ++nrc;
}
}
else c=0;
cout<<nrl/nrc;
}