Cod sursa(job #2891015)
Utilizator | Data | 17 aprilie 2022 12:49:58 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.47 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin ("text.in");
ofstream fout ("text.out");
char x , y;
int cnt , m;
int main(){
ios_base::sync_with_stdio(false);
fin.get(x);
if (isalpha(x)){
cnt += 1;
}
while (fin.get(y)){
if (isalpha(y)){
cnt += 1;
}
else{
if (isalpha(x)){
m += 1;
}
}
x = y;
}
fout << cnt / m;
}