HDACM 1330
习惯性打表,一次性过
import java.util.Scanner;public class Main{public static void main(String[] args) {double len[] = new double[100000];double sum = 0;for (int i = 1; i < len.length; i++) {sum += 1.0/(i*2);len[i]=sum;}Scanner sc = new Scanner(System.in);boolean isFirst = true;while (sc.hasNext()) {if (isFirst) {System.out.println("# Cards Overhang");isFirst = false;}int n = sc.nextInt();System.out.printf("%5d %.3f",n,len[n]);System.out.println();}}
}