Home > Back-end >  Joseph problem
Joseph problem

Time:10-01

How to achieve specified from someone started to count off? You can write about this specific code?

CodePudding user response:

 
#include
Int main ()
{
Bool all [31];//all [0] don't
Int times=0;
For (auto & amp; A: all)
A=true;
Int c=0;
For (int b=0; B<15. + a + b)
{
While (1)
{
If (c<30)
+ + c;
The else
C=1;
If (all [c])
+ + times;
If (9 times %==0)
{
All [c]=false;
Times=0;
break;
}
}
}
For (int a=1; a<=30; + + a)
STD: : coutreturn 0;
}

This is the answer
Give some useful points

CodePudding user response:

1 is and the zero is
  • Related