Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
105152 赖原骐23140 棋子移动 C++ 解答错误 20 0 MS 252 KB 404 2023-10-05 11:10:34

Tests(1/5):


#include<iostream> using namespace std; void f(int x) { if(x==4) { cout<<"4,5-->9,10"<<endl; cout<<"8,9-->4,5"<<endl; cout<<"2,3-->8,9"<<endl; cout<<"7,8-->2,3"<<endl; cout<<"1,2-->7,8"<<endl; return; } cout<<x<<","<<x+1<<"-->"<<2*x+1<<","<<2*x+2<<endl; cout<<2*x<<","<<2*x+1<<"-->"<<x<<","<<x+1<<endl; f(x-1); } int main() { int n; cin>>n; f(n); return 0; }


测评信息: