HDACM 2139
由于Java的System.out.println(sum[n]);函数是 加了锁的(synchronized) 打印速度慢所以A不了
import java.util.Scanner;public class Main{public static void main(String[] args) {int sum[] = new int[2345];sum[1] = 1;for (int i = 3; i < sum.length; i += 2) {sum[i] = sum[i-2]+i*i;}Scanner sc = new Scanner(System.in);while(sc.hasNext()){int n = sc.nextInt();System.out.println(sum[n]);}sc.close();}
}