Pagini recente » Cod sursa (job #2172668) | Cod sursa (job #1840649) | Cod sursa (job #2272116) | Cod sursa (job #2336912) | Cod sursa (job #3032328)
#include <bits/stdc++.h>
using namespace std;
const string file_name = "text";
ifstream fin(file_name + ".in");
ofstream fout(file_name + ".out");
string x;
long long cuv, nmax;
bool gasit = false;
int main()
{
getline(fin, x);
for(int i = 0; i < x.size(); i++){
//cout << x[i];
if(!isalpha(x[i])){
if(gasit == true){
cuv++;
}
gasit = false;
}
if(isalpha(x[i])){
nmax++;
gasit = true;
}
}
cuv++;
nmax /= cuv;
fout << nmax;
return 0;
}