Input
Input only a line, the monkey number n and number off m,
The Output
The serial number of the great king, the king output only a line, output
The Sample Input
10 3
The Sample Output
4
#include
Int main ()
{
Long long int n, m, I, a [1000], the sum=0, nn, * p;
The scanf (" % LLD % LLD, & amp; N, & amp; M);
Nn=n;
for(i=0; i
If (n==1)
Printf (" % LLD \ n ", n);
The else
{
While (n!
=1){
for(i=0; i
If (a [I]==1)
{
sum++;
}
If (sum % m==0)
{
N -;
A [I]=0;
}
If (n==1)
break;
}
}
for(i=0; i
If (a [I]==1)
break;
}
Printf (" % LLD \ n ", I + 1); }
return 0;
}
Bosses help me have a look at what is wrong? Wa T ^ T