Cod sursa(job #1365371)
Utilizator | Data | 28 februarie 2015 11:37:31 | |
---|---|---|---|
Problema | Text | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
string v[1000000];
unsigned long long int i=1,u,n,k;
int main()
{
while (f>>v[i]) i++;
for (u=1;u<i;u++)
{n=n+v[u].length(); k++;}
g<<n/k;
return 0;
}