import java.util.ArrayList;
import java.util.Calendar;
public class CAL {
public static void main(String[] args) {
// TODO Auto-generated method stub
Calendar start = Calendar.getInstance();
System.out.println(start.getTimeInMillis());
ArrayList<Integer> number = new ArrayList<Integer>();
number.add(1);number.add(1);
for (int i = 2; i <= 100000; i++) {
number.add(number.get(i - 1) + number.get(i - 2));
}
Calendar end = Calendar.getInstance();
System.out.println(end.getTimeInMillis());
System.out.println("时间:" + (end.getTimeInMillis()-start.getTimeInMillis() ));
System.out.println("last:"+number.get(100000));
}
}
posted on 2013-01-25 11:15
Jimi 阅读(1908)
评论(0) 编辑 收藏 所属分类:
算法