import java.util.*; public class ExtremeFibonacci { public static long fib(long n){ if(n < 2) return 1; return fib(n-2) + fib(n-1); } public static long fib(int n, int k){ long f0 = 1; long f1 = 1; for(int i=2;i<=n;i++){ long tmp = f1; f1 = f0 + f1; f0 = tmp; f1 = f1 % (long) Math.pow(10,k); f0 = f0 % (long) Math.pow(10,k); } return f1; } static int numberSize(long n){ return (n + "").length(); } public static String formatResult(long res, int k){ int zeros = k - numberSize(res); StringBuffer sb = new StringBuffer(); sb.append(res); for(int i=0;i