/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Ideone { { // your code goes here ArrayList<Integer> al = new ArrayList<Integer>(); al.add(0); al.add(1); int size = 15; //System.out.print(al.get(0) + " "); //System.out.print(al.get(0) + " "); for(int i=2; i<=size; i++) { al.add(al.get(i-1)+al.get(i-2)); //System.out.print(al.get(i) + " "); } } }
Standard input is empty