Cod sursa(job #2144225)
Utilizator | Data | 26 februarie 2018 16:57:50 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.39 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int n,y,m,b,i,j,u,e,o,minn,maxx,k,z,c[1001],a,v[1001][1001],ok=0,d,r,s;
char x[10001],*p,l;
int main()
{
f.get(x,1001);
p=strtok(x," ,-!?;:");
while (p!=0)
{
o=strlen(p);
j=j+o;
k++;
p=strtok(NULL," ,-!?;:");
}
g<<j/k;
}