CodeGeeX
CodeGeeX copied to clipboard
Datapoint CPP/38 has some issue
The datapoint in Humaneval-x CPP/38 has a few lines repeated between declaration
and canonical_solution
The declaration is
...
string decode_cyclic(string s){
int l=s.length();
int num=(l+2)/3;
string x,output;
int i;
for (i=0;i*3<l;i++)
{
The solution is
int l=s.length();
int num=(l+2)/3;
string x,output;
int i;
for (i=0;i*3<l;i++)
{
x=s.substr(i*3,3);
if (x.length()==3) x=x[2]+x.substr(0,2);
output=output+x;
}
return output;
}