Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
100197 | 任斌 | 杀人游戏 | C++ | Wrong Answer | 1 MS | 272 KB | 199 | 2024-12-07 09:25:11 |
#include<bits/stdc++.h> using namespace std; int f(int n,int m){ if(n==1)return 1; else{ return (f(n-1,m)+m)%n; } } int main() { int n,m; cin>>n>>m; cout<<f(n,m); return 0; }
------Input------
10 9
------Answer-----
9 8 10 2 5 3 4 1 6
------Your output-----
5