Cod sursa(job #1821484)
| Utilizator | Data | 3 decembrie 2016 11:11:26 | |
|---|---|---|---|
| Problema | Text | Scor | 40 |
| Compilator | cpp | Status | done |
| Runda | x_test2 | Marime | 0.53 kb |
#include <fstream>
#include <cstring>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int i,k,m,nr,n,ok;
char simb[110],s[1100000],*p,cuv[1100000],vec[]="qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
int main()
{
f.getline(s,110000);
n=strlen(s);
m=0;
nr=0;
for(i=0;i<n;i++){
if(strchr(vec,s[i])==0){
if(ok==1){
nr++;
ok=0;
}
}
else{
m++;ok=1;
}
}
g<<m/nr;
}
