(计算几何8.1.3.1)UVA 10213 How Many Pieces of Land?(使用欧拉公式的应用顶点数+面数-棱数 = 2)
2013-11-17 09:16
495 查看
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--; } } }
相关文章推荐
- UVa 10213 How Many Pieces of Land ? (计算几何+大数)
- UVa 10213 How Many Pieces of Land ? (计算几何+大数)欧拉定理
- uva 10213 How Many Pieces of Land (欧拉公式计算多面体)
- UVa 10213 (欧拉公式+Java大数) How Many Pieces of Land ?
- UVa 10213 How Many Pieces of Land ? (数学&欧拉公式&高精度)
- 【分割圆】Uva 10213 - How Many Pieces of Land ?
- UVa 10213 How Many Pieces of Land ?
- UVa Problem 10213 How Many Pieces of Land? (土地分割)
- UVa 10213 How Many Pieces of Land?
- UVA-10213 How many pieces of land
- UVa 10213 - How Many Pieces of Land ?
- UVa 10213 How Many Pieces of Land
- 【UVA】10213 - How Many Pieces of Land ?(大树模板X2)
- uva_10213 - How Many Pieces of Land ?
- UVa 10213 How Many Pieces of Land (欧拉定理)
- uva 10213 how many pieces of land
- UVA 10213 How Many Pieces of Land? 欧拉定理
- UVA 10213(p336)----How Many Pieces of Land
- UVa10213 - How Many Pieces of Land ?
- uva 10213 How Many Pieces of Land 分割圆 高精度