NYOJ45 棋盘覆盖
来源:互联网 发布:淘宝2016版本5.7.0下载 编辑:程序博客网 时间:2024/06/01 10:05
原题链接
import java.util.Scanner;import java.math.BigInteger;public class Main{public static void main(String[] args){Scanner cin = new Scanner(System.in);int m, k;BigInteger a;m = cin.nextInt();while(m-- > 0){k = cin.nextInt();a = BigInteger.ONE;for(int i = 1; i <= k; ++i)a = a.multiply(BigInteger.valueOf(2));a = a.multiply(a);a = a.subtract(BigInteger.valueOf(1)).divide(BigInteger.valueOf(3));System.out.println(a);}}}
0 0
- NYOJ45 棋盘覆盖
- NYOJ45棋盘覆盖
- NYOJ45棋盘覆盖
- nyoj45 棋盘覆盖
- nyoj45 棋盘覆盖
- 棋盘覆盖
- 棋盘覆盖
- 棋盘覆盖
- 棋盘覆盖
- 棋盘覆盖
- 棋盘覆盖
- 棋盘覆盖
- 棋盘覆盖
- 棋盘覆盖
- 棋盘覆盖
- 棋盘覆盖
- 棋盘覆盖
- 棋盘覆盖
- Hough 变换算法研究
- 导视系统设计欣赏
- 对于retain和assign属性的理解
- PostgreSQL 序列(SEQUENCE)
- 【安卓笔记】touch事件的分发和消费机制
- NYOJ45 棋盘覆盖
- android 内存溢出(oom)产生原因和内存优化
- cocos2d-x jsb 防止触摸事件传递
- 动态添加标题和Viewpager,标题和ViewPager联动滑动
- lucene4.1 小例子 全文检索
- php 做图像报表
- 【JavaScript】encodeURI() 函数
- Hadoop2.2.0已经遗弃的属性名称
- iOS基础面试题(四)