Pagini recente » Rating UPTLateRegistry (UPT_Patrascoiu_Teudan_Nume3) | Rating Echipa UTCN Hagyma (Hagyma_Kerekes_Varady_Zongor) | Profil UPT_Lupu_Kiss_Buliga | Cod sursa (job #3272985)
#include <bits/stdc++.h>
using namespace std;
ifstream in("text.in");
ofstream out("text.out");
int main() {
string s;
getline(in, s);
int length = 0, count = 0;
regex r("[a-zA-Z]+");
for (auto it = sregex_iterator(s.begin(), s.end(), r); it != sregex_iterator(); it++) {
length += it->str().size();
count++;
}
out << length / count;
return 0;
}