Cod sursa(job #1438291)
| Utilizator | Data | 19 mai 2015 16:09:18 | |
|---|---|---|---|
| Problema | Jocul Flip | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.4 kb |
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int main()
{
string s;
int cuv=0,sum=0;
while(f>>s)
{
if(s.find("-")!=std::string::npos||s.find("'")!=std::string::npos||s.find("")!=std::string::npos){cuv++;}
cuv++;
sum+=s.length();
}
g<<sum/cuv;
return 0;
}
