Pagini recente » Profil evelyna | Cod sursa (job #713714) | Cod sursa (job #1996113) | Cod sursa (job #2712084) | Cod sursa (job #1739312)
#include <fstream>
#include <cstring>
using namespace std;
const int LEN = 2000000;
ifstream fin("text.in");
ofstream fout("text.out");
char a[LEN];
bool Litera(char p)
{
return ((p >= 'A' and p <= 'Z') or (p >= 'a' and p <= 'z'));
}
int main()
{
fin.getline(a, LEN);
int n = strlen(a);
int x = 0, y = 0;
for (int i = 0; i < n; i++)
if (Litera(a[i]))
{
x++;
if (not Litera(a[i + 1]))
y++;
}
fout << x / y << '\n';
return 0;
}