Cod sursa(job #2069168)

Utilizator KaizarTCOSolcan Cezar KaizarTCO Data 18 noiembrie 2017 12:13:57
Problema Text Scor 40
Compilator cpp Status done
Runda evaluare_cex_sv_cls_x Marime 0.37 kb
#include <bits/stdc++.h>

using namespace std;
ifstream f("text.in");
ofstream g("text.out");
char s[100001],*p,v[]="`~!@#$%^&*()-_=+[{\]};:'|<.>/?\, ";
int n,x;
void citire()
{
    f.get(s,100001);
    p=strtok(s,v);
    while(p){
        n++;
        x+=strlen(p);
        p=strtok(NULL,v);
    }

}
int main()
{
    citire();
    g<<x/n;
    return 0;
}