没什么坑
#include <iostream>
#include <cstring>
using namespace std;
int a[1005];
int main()
{
int n, k;
cin >> n >> k;
memset(a, 0, sizeof(a));
//memset(a[1],0,sizeof(a[1]));
//int flag = 0;
int count = 0;
int num = 1;
int nn = n;
while (1)
{
if (a[count] == 0)
{
//a[count] =num;
if (num % k == 0||num%10==k)
{
a[count] = 1;
nn--;
}
if(nn==1)break;
num++;
}
count++;
count = count % n;
}
for(int i = 0;i<n;i++)
if(a[i]==0)cout<<i+1<<endl;
return 0;
}