提交时间:2021-05-27 20:31:29
运行 ID: 19981
#include<bits/stdc++.h> using namespace std; int n,k,i,m,iii,mm,ii=1; int card[1000]; int main(){ cin>>n>>k>>i; m=n/2; for(int q=0;q<k;q++){ mm=m+1; while(ii==m+1){ card[iii]=ii; iii++; card[iii]=mm; ii++; iii++; mm++; } } cout<<card[i]; return 0; }