Cod sursa(job #2068847)
| Utilizator | Data | 18 noiembrie 2017 11:26:19 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | evaluare_cex_sv_cls_x | Marime | 0.53 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int main()
{
long long cuv = 0, lit = 0;
char c;
f >> noskipws;
f >> c;
while (!f.eof()) {
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
++cuv;
while ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
++lit;
f >> c;
}
}
else {
f >> c;
}
}
g << lit / cuv;
return 0;
}
