Cod sursa(job #1393857)
Utilizator | Data | 19 martie 2015 20:03:23 | |
---|---|---|---|
Problema | Text | Scor | 20 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.49 kb |
#include<fstream>
#include<cstring>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
long long suma,cuv;
bool e;
char a[1000010];
int main()
{
fin.get(a,1000010);
for(int a1=1;a1<=strlen(a);a1++)
if((a[a1]>='a' and a[a1]<='z') or (a[a1]>='A' and a[a1]<='Z'))
{
suma++;
if(e==0)
{
cuv++;
e=1;
}
}
else e=0;
fout<<suma/cuv;
}