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