Cod sursa(job #2246970)
Utilizator | Data | 27 septembrie 2018 18:59:20 | |
---|---|---|---|
Problema | PScPld | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.44 kb |
#include <bits/stdc++.h>
using namespace std;
int main(){
ifstream f("pscpld.in");
ofstream g("pscpld.out");
char s[256];
f>>s;
int i,j,k=0,aux=strlen(s),sum=0,ok;
while(aux>0){
ok=1;
j=strlen(s);
for(i=k;i<=j;i++){
if(s[i]!=s[j])ok=0;
}
if(ok)sum++;
}
g<<sum;
}