// This is an example of Cauchy sequence. // // About the model, I refered to the wikipedia. // // Let's enjoy JAVA programming. // import java.io.*; import java.text.DecimalFormat; import java.math.BigDecimal; import java.math.BigInteger; class loop_x { public static double x; private static String yx; public static void input_x() { do { BufferedReader br = new BufferedReader( new InputStreamReader(System.in)); System.out.println("Please enter X ,which is a natural number, and X<10^8."); yx = null; try{ yx = br.readLine(); } catch (IOException e){ System.err.println(e.getMessage()); } x = Double.valueOf(yx).doubleValue(); if (x<=0){ System.out.println("As X is positive, " + x + " is invalid."); } if (x!=(long)x){ System.out.println("As X is an integer, " + x + " is invalid."); } if (x>=Math.pow(10.0,8)){ System.out.println("As X<10^8, " + x + " is invalid."); } } while (x<=0 || x!=(long)x || x>=Math.pow(10.0,8)); } } class loop_n { public static double n; public static BigDecimal n0; private static int d1, d2; private static String yn; private static BigDecimal n1, n2; public static void input_n() { do { BufferedReader br = new BufferedReader( new InputStreamReader(System.in)); System.out.println("Please enter N ,which is a rational number, and 0.1^16