Cod sursa(job #2360697)
Utilizator | Data | 2 martie 2019 08:32:49 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.48 kb |
#include <iostream>
#include <fstream>
typedef long long LL;
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char c;
LL cuv, nr, l;
bool check(char n)
{return ((c>='a' && c<='z') || (c>='A' && c<='Z'));}
int main()
{
while(fin.get(c))
{
if(check(c))
{
if(l==0)
cuv++;
nr++;
l=1;
}
else{l=0;}
}
fout<<nr/cuv;
return 0;
}