Pagini recente » Statistici Ghiriti Edmond (Edythestar) | Rating Letitia Marin (Letitia_Milko) | Cod sursa (job #56479) | Cod sursa (job #206826) | Cod sursa (job #2897225)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
bool let(char c) {
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
}
int main() {
string s;
getline(fin, s);
long long lgt = 0, nrc = 0, lg = s.length();
int i = 0;
while (i < lg && !let(s[i]))
i++;
while (i < lg)
{
nrc++;
while (i < lg && let(s[i]))
i++, lgt++;
while (i < lg && !let(s[i]))
i++;
}
fout << lgt / nrc;
return 0;
}