#include <iostream>
#include<math.h>
#include<queue>
using namespace std;
int main()
{
int n, k;
cin >> n>>k;
queue<int> test;
for (int i = 1;i <= n;i++)
test.push(i);
int count = 1;
while(test.size()>1)
{
int t = test.front();
test.pop();
if (!(count%k == 0 || count % 10 == k))
{
test.push(t);
}
++count;
}
cout << test.front();
}
20171202--游戏
最新推荐文章于 2021-08-31 11:17:24 发布