Cod sursa(job #2484814)
Utilizator | Data | 31 octombrie 2019 17:13:06 | |
---|---|---|---|
Problema | Text | Scor | 30 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.49 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
long long nr,nrcv,i;
char af[60]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
string s;
int main()
{
getline(f,s);
while(!strchr(af,s[i]))
i++;
while(s[i])
{
int j=i;
while(strchr(af,s[j]))
{
j++;
nr++;
}
nrcv++;
i=j;
i++;
}
g<<nr/nrcv;
return 0;
}