Pagini recente » Cod sursa (job #1637935) | Cod sursa (job #1861762) | Cod sursa (job #2542262) | Cod sursa (job #1974138) | Cod sursa (job #2134905)
#include <bits/stdc++.h>
using namespace std;
inline void Boost() {
ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
freopen("text.in", "r", stdin);
freopen("text.out", "w", stdout);
#endif
}
int main() {
Boost();
stringstream ss;
char c;
while(cin.get(c)) {
if(isalpha(c))
ss << c;
else
ss << " ";
}
string s;
int nrCuvinte = 0, nrLitere = 0;
while(ss >> s) {
nrCuvinte++;
nrLitere += (int)s.size();
}
cout << (int)(nrLitere / nrCuvinte);
return 0;
}