public class DiguiDemo {
public static void main(String[] args) {
// a(50);
double a= System.currentTimeMillis();
System.out.println(a(1023));
double b=System.currentTimeMillis();
System.out.println(b-a);
}
public static double a(double n){
if(n==0){
return 1;
}else{
return 2*a(n-1);
}
}
} |
|