#include <bits/stdc++.h> using namespace std; int main(){ int n,x,s_x; cin>>n>>x; int a[n],b[n]; for(int i=0;i<n;i++){ a[i]=i+1; } int j=0,t,d=0; int s=0; while(n){ t=0; s++; cout<<"小苞第"<<s<<"天拿走了編號為"; for(int i=0;i<n;i+=3){ cout<<a[i]<<" "; if(a[i]==x){ s_x=s; } a[i]=0; t++; } cout<<"的蘋果"<<endl; j=0;d=0; for(int i=0;i<n;i++){ if(a[i]!=0){ b[j]=a[i]; j++; a[d]=b[d]; d++; } } n-=t; } cout<<endl<<"編號為"<<x<<"的蘋果,在第"<<s_x<<"天被拿走!"; return 0; }