Cod sursa(job #2069202)
Utilizator | Data | 18 noiembrie 2017 12:25:08 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | cpp | Status | done |
Runda | evaluare_cex_sv_cls_x | Marime | 0.41 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();
if(n!=0)
g<<x/n;
else
g<<x;
return 0;
}