Cod sursa(job #2628367)
| Utilizator | Data | 15 iunie 2020 17:38:43 | |
|---|---|---|---|
| Problema | Text | Scor | 20 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.53 kb |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fisier 1
const int mxN = 2e5;
int32_t main(){
#ifdef fisier
ifstream cin("text.in");
ofstream cout("text.out");
#endif
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
string s;
getline(cin,s);
int ans = 0, cuv = 1, litera = 0;
for (char d : s){
if ((d >= 65 && d<=90) || (d>= 97 && d <= 122)){
ans++; litera++;
}
else {
if (litera) cuv++;
litera = 0;
}
}
cout << ans / cuv;
//cout << s.size();
}
