Home > Back-end >  Help to have a look at, I was wrong in where?
Help to have a look at, I was wrong in where?

Time:09-20

CodePudding user response:

If is a programming platform, give a best title link, in addition, your code into the picture, others to help you debug why hand to play again?

CodePudding user response:

Five 3 into the system, but also three largest ^ 6-1=728, how can so long the result

CodePudding user response:

According to the thinking of you now, in the loop count t to upside down
For (long long I=4; iThe switch (n) [I] case unchanged
The switch (n] [I - 1) case same
.
Switch (n) [4] I - case unchanged//array to calculate in reverse chronological order
}
Or
For (long long I=0; I + 4 & lt; s; I++) {
The switch (n) [I] case unchanged
[I switch (n + 1]) {//case change
Case: y t=t * 10 + 2; break;
Case b: t=t * 10 + 1; break;
Case r: t=t * 10;
}
.
Switch (n + 4] [I) {//array or order
Case: y t=t * 10 + 2; break;
Case b: t=t * 10 + 1; break;
Case r: t=t * 10;
}
}
In addition, actually you can put the decimal in the for good
For (long long I=0; I + 4 & lt; s; I++) {
The switch (n) [I]//case unchanged
[I switch (n + 1]) {//case change
Case: y t=t * 3 + 2; break;
Case b: t=t * 3 + 1; break;
Case r: t=t * 3;
}
.
Switch (n + 4] [I) {//array or order
Case: y t=t * 3 + 2; break;
Case b: t=t * 3 + 1; break;
Case r: t=t * 3;//calculate t is the decimal
}
}

CodePudding user response:

Thank you teach, by teaching
  • Related