UVA 10579 - Fibonacci Numbers UVA • Sep 1, 2020 Problem PDFSolution:package mypkg; import java.math.BigInteger; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner in = new Scanner (System.in); int n; while(in.hasNext()) { n=in.nextInt(); BigInteger a=BigInteger.ONE; BigInteger b=BigInteger.ONE; BigInteger sum=BigInteger.ZERO; while(n>=3) { sum=a.add(b); b=a; a=sum; n--; } System.out.println(sum); } } } https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/10579/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