0
已解决
王泽轩
资深天翼
资深天翼
#include <bits/stdc++.h>
using namespace std;
void hano(int n,char a,char c,char b){
if(n==1){
printf("%c->%d->%c\n",a,n,b);
}
else{
hano(n-1,a,b,c);
printf("%c->%d->%c\n",a,n,b);
hano(n-1,c,a,b);
}
}
int main(){
int n;
char a,b,c;
cin>>n>>a>>b>>c;
hano(n,a,c,b);
return 0;
}
WA0!
?????
????
???
??
?
??
???
????
?????