Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
105171 董乐 棋子移动 C++ 解答错误 20 0 MS 252 KB 440 2023-10-05 11:15:28

Tests(1/5):


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


测评信息: