import java.math.BigInteger;
import java.util.Scanner;
public class UVA_10213 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int t = scanner.nextInt();
while(t > 0){
int n = scanner.nextInt();
BigInteger ans = new BigInteger(n +"").pow(4).subtract(new BigInteger(n +"").pow(3).multiply(new BigInteger(6+""))).add(new BigInteger(23+"").multiply(new BigInteger(n +"").pow(2) ).subtract(new BigInteger(18+"").multiply(new BigInteger(n +"")))).divide(new BigInteger(24+"")).add(new BigInteger(1+""));
System.out.println(ans);
t--;
}
}
}
(计算几何8.1.3.1)UVA 10213 How Many Pieces of Land?(使用欧拉公式的应用顶点数+面数-棱数 = 2)
最新推荐文章于 2019-07-26 20:50:08 发布