Cod sursa(job #2609078)
Utilizator | Data | 2 mai 2020 10:12:17 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | igorj_mentorat1 | Marime | 0.32 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int lg, rez, tot;
int main()
{
char ch;
while (f.get(ch))
if (isalpha(ch))
lg++, tot++;
else if (lg)
rez++, lg = 0;
rez += !!lg;
g << tot / rez;
return 0;
}