提交时间:2024-07-18 10:40:12
运行 ID: 156677
#include <iostream> using namespace std; int Choose_king(int n,int m) { int k=0; for(int i=2;i<=n;i++) { k=(k+m)%i; } return k+1; } int main() { int n,m; cin>>n>>m; cout<<Choose_king(n,m); return 0; }