//HanioTower.java
import java.io.*;public class HanioTower
{
public static void main(String[] args)
{
int n=0;
System.out.print("请输入金片的个数:");
trt
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
n=Integer.parseInt(br.readLine());
}catch(IOException ex){}
hanio('A','C','B',n);
}
static void hanio(char from,char to,char temp,int n)
{
System.out.println("调用hanio("+from+","+to+","+team+","+n+")");

if(n==1)
System.out.println(from+"move to"+to);
else
{
hanio(from,temp,to,n-1);
System.out.println(from+"move to"+to);
hanio(temp,to,from,n-1);
}
}
}