Cod sursa(job #1393862)
| Utilizator | Data | 19 martie 2015 20:05:49 | |
|---|---|---|---|
| Problema | Text | Scor | 30 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.53 kb |
#include<fstream>
#include<cstring>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
long long suma,cuv;
bool e;
int n;
char a[1000010];
int main()
{
fin.get(a,1000010);
n=strlen(a);
for(int a1=1;a1<=n;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;
}
