Cod sursa(job #2758138)
Utilizator | Data | 8 iunie 2021 18:15:18 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.44 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
bool cuvon;
char ch;
int nrlet,nrcuv;
int main()
{
while(!fin.eof())
{
ch=fin.get();
if((ch-'0'>=17 && ch-'0'<=42) || (ch-'0'>=49 && ch-'0'<=74))
{
nrlet++;
if(cuvon==0)cuvon=1,nrcuv++;
}
else cuvon=0;
}
fout << nrlet/nrcuv << '\n';
return 0;
}