UVA 495 - Fibonacci Freeze UVA • Sep 1, 2020 Problem PDFSolution:import java.io.*; import java.util.Scanner; import java.util.ArrayList; import java.math.BigInteger; public class Main { public static void main(String [] args0) { BigInteger [] fibs = new BigInteger [5001]; Scanner in = new Scanner(System.in); fibs[0] = BigInteger.ZERO; fibs[1] = BigInteger.ONE; fibs[2] = BigInteger.ONE; for(int i = 3; i < 5001; i++) { fibs[i] = fibs[i-1].add(fibs[i-2]); } while( in.hasNextInt() ){ int n = in.nextInt(); System.out.println("The Fibonacci number for " + n + " is " + fibs[n] ); } } } https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/495/Main.java Tags UVA Competitive Programming Shipu Ahamed Recommended for you UVA UVA 913 - Joana and the Odd Numbers 4 years ago • 1 min read UVA UVA 871 - Counting Cells in a Blob 4 years ago • 3 min read UVA UVA 866 - Intersecting Line Segments 4 years ago • 3 min read