#include <iostream> using namespace std; int main() { int n, m; while(cin>>n>>m) { int s = 0; for(int i=2;i<=n;i++) { s = (s+m)%i; } cout<<"The Winner is "<<s+1<<endl; } }
posted on 2013-09-30 20:35 Knuth_档案 阅读(168) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 Knuth_档案 Powered by .NET 9.0 on Kubernetes