Cod sursa(job #2069357)
| Utilizator | Data | 18 noiembrie 2017 12:59:04 | |
|---|---|---|---|
| Problema | Text | Scor | 60 |
| Compilator | cpp | Status | done |
| Runda | evaluare_cex_sv_cls_x | Marime | 0.64 kb |
#include <fstream>
using namespace std;
ifstream in ("text.in");
ofstream out ("text.out");
char s[8400000];
int tc,nrcuv;
int main()
{
int i;
in.getline(s,8400000);
while(s[0]!=NULL)
{
for(i=0;s[i]!=NULL;i++)
{
if(isalpha(s[i]))
{
nrcuv++;
while(isalpha(s[i]))
{
tc++;
i++;
}
}
}
s[0]=NULL;
in.getline(s,8400000);
}
if(nrcuv==0)
out<<0;
else
out<<tc/nrcuv;
return 0;
}
