Cod sursa(job #1418753)
Utilizator | Data | 13 aprilie 2015 21:55:33 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.34 kb |
#include<fstream>
#include<iostream>
#include<string.h>
using namespace std;
char s[1073741860];
int main()
{
ifstream in("text.in");
ofstream out("text.out");
int x=0,nr,l;
char c;
while(in.get(c))
{
if(isalpha(c))
{
l++;
if(x==0)
++nr;
x=1;
}
else
x=0;
}
out<<l/nr;
return 0;
}