Pagini recente » Cod sursa (job #685784) | Cod sursa (job #302) | Cod sursa (job #2877124) | Cod sursa (job #9199) | Cod sursa (job #3040069)
/// [A][M][C][B][N] ///
#include <bits/stdc++.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
string str;
getline(fin, str);
for (auto& c : str) {
if (!(('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'))) {
c = ' ';
}
}
stringstream ss(str);
int cnt = 0, len = 0;
while (ss >> str) {
cnt++, len += str.size();
}
fout << len / cnt;
}