Cod sursa(job #2106625)
Utilizator | Data | 15 ianuarie 2018 23:19:53 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.46 kb |
#include <bits/stdc++.h>
using namespace std;
int main() {
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
string a;
getline(cin,a);
int t = 0;
int u = 0;
for (int i=0;i<a.size();i++)
{
if (isalpha(a[i]))
{
while(isalpha(a[i])) {i++; t++;}
i--;
// t--;
u++;
}
}
// cout <<t <<endl;
cout << t/u<<endl;
return 0;
}