Cod sursa(job #2561357)
| Utilizator | Data | 28 februarie 2020 19:07:13 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.47 kb |
#include <bits/stdc++.h>
#define DAU ios::sync_with_stdio(false); fin.tie(0); fout.tie(0);
#define PLEC fin.close(); fout.close(); return 0;
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char c;
int curr, cnt, sum;
int main()
{
DAU
while (fin.get(c))
if (isalpha(c))
{
if (!curr)
curr = 1, ++cnt;
++sum;
}
else curr = 0;
fout << sum / cnt;
PLEC
}
