Cod sursa(job #2653941)
Utilizator | Orban Robert KillHorizon23 | Data | 29 septembrie 2020 16:29:47 |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.43 kb |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ifstream fin("text.in");
ofstream fout("text.out");
int lit, cuv;
bool k;
int main()
{
ios::sync_with_stdio(false);
fin.tie(0);
char c;
while (fin.get(c))
{
if (isalpha(c)) ++lit, k = true;
else if (k) ++cuv, k = false;
}
fout << lit / cuv;
return 0;
}