Cod sursa(job #2631793)

Utilizator sebastianp2003Popa Sebastian sebastianp2003 Data 1 iulie 2020 01:56:06
Problema Text Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme 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;
}