Home > Back-end >  There are n people in a circle, numeral sequence. Personal started to count off from 1 (count off fr
There are n people in a circle, numeral sequence. Personal started to count off from 1 (count off fr

Time:09-27

#include
Void main ()
{
Int n, I, k=0;
While (~ the scanf (" % d ", & amp; N)) {
If (n==0) break;
for(i=1; i<=n; I++) {
K=(k + 3) % I;
}
Printf (" % d \ n ", k + 1);
}
}

Ask what is the principle of this kind of writing, don't understand the logic
  • Related