package fuqu.Test;
import java.util.*;
public class test {
public static void main(String[] args) {
int[] arr = new int[50000];
arr[0] = 1;
int num=1;
for(int i = 1;i<=19;i++){
int count=0;
for(int c = 0;c<num;c++){
arr[c]+=1;
}
for(int j = 0;j<num;j++){
if(arr[j]>2){
arr[num]=1;
count+=1;
}
}
for(int k =0;k<count;k++){
arr[num+k+1]=1;
}
num+=count;
}
System.out.println(num);
}
}
|
|