Cod sursa(job #2709349)
Utilizator | Data | 20 februarie 2021 10:47:46 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.51 kb |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ifstream f("text.in");
ofstream g("text.out");
char c;
bool cant;
int l,nrcuv;
int main()
{
while(f.get(c))
{
if ((c>='A' && c<='Z')||(c>='a' && c<='z'))
{
l++;
if (!cant)
cant=1;
}
else
{
if (cant){
nrcuv++;
cant=0;
}
}
}
g<<l/nrcuv;
return 0;
}