```
if(numRows==1) return s;
int k=2*numRows;
string temp=s;
int len=s.length();
int i=0;
int j=0;
int c=0;
while(c<numRows){
while(i<len){
temp[j]=s[i];
if(c==0||c==numRows-1) i=i+k-2;
else i=i+k-2*c-2;
j=j+1;
if(i>len){
i=c+1;
break;
}
}
c++;
}
return temp;
```

"Apalindromeisaword,phrase,number,orothersequenceofunitsthatcanbereadthesamewayineitherdirection,withgeneralallowancesforadjustmentstopunctuationandworddividers.",2

my answer for the example is run time error,but my noppad++ is correct run. I don,t know the reason.