Cod sursa(job #2845823)
| Utilizator | Data | 8 februarie 2022 13:43:11 | |
|---|---|---|---|
| Problema | Text | Scor | 90 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.58 kb |
//#include <fstream>
//#include <iostream>
//#include <climits>
//#include <string.h>
#include <bits/stdc++.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int main()
{
bool ok=0;
int l=0,cuv=0;
char c;
while(fin.get(c))
{
if((c >= 'a' && c <= 'z') || (c >= 'A' && c <=' Z'))
{
ok = 1;
l++;
}
else if(ok == 1)
{
cuv++;
ok = 0;
}
}
if(cuv == 0)
fout<<0;
else
fout<<(int)l/cuv;
return 0;
}
