题目链接

https://www.patest.cn/contests/gplt/L1-012

AC代码

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <deque>
#include <vector>
#include <queue>
#include <string>
#include <cstring>
#include <map>
#include <stack>
#include <set>
#include <cstdlib>
#include <ctype.h>
#include <numeric>
#include <sstream>
using namespace std;

typedef long long LL;
const double PI = 3.14159265358979323846264338327;
const double E = 2.718281828459;
const double eps = 1e-6;
const int MAXN = 0x3f3f3f3f;
const int MINN = 0xc0c0c0c0;
const int maxn = 1e5 + 5;
const int MOD = 1e9 + 7;

int main()
{
    int n;
    cin >> n;
    printf("2^%d = %d\n", n, 2 << (n - 1));
}

PAT 天梯赛 L1-012. 计算指数 【水】的更多相关文章

  1. PAT 天梯赛 L1-047. 装睡 【水】

    题目链接 https://www.patest.cn/contests/gplt/L1-047 AC代码 #include <iostream> #include <cstdio&g ...

  2. PAT 天梯赛 L1-042. 日期格式化 【水】

    题目链接 https://www.patest.cn/contests/gplt/L1-042 AC代码 #include <iostream> #include <cstdio&g ...

  3. PAT 天梯赛 L1-041. 寻找250 【水】

    题目链接 https://www.patest.cn/contests/gplt/L1-041 AC代码 #include <iostream> #include <cstdio&g ...

  4. PAT 天梯赛 L1-022. 奇偶分家 【水】

    题目链接 https://www.patest.cn/contests/gplt/L1-022 AC代码 #include <iostream> #include <cstdio&g ...

  5. PAT 天梯赛 L1-016. 查验身份证 【水】

    题目链接 https://www.patest.cn/contests/gplt/L1-016 AC代码 #include <iostream> #include <cstdio&g ...

  6. PAT 天梯赛 L1-014. 简单题 【水】

    题目链接 https://www.patest.cn/contests/gplt/L1-014 AC代码 #include <iostream> #include <cstdio&g ...

  7. PAT 天梯赛 L1-010. 比较大小 【水】

    题目链接 https://www.patest.cn/contests/gplt/L1-010 AC代码 #include <iostream> #include <cstdio&g ...

  8. PAT 天梯赛 L1-007. 念数字 【水】

    题目链接 https://www.patest.cn/contests/gplt/L1-007 AC代码 #include <iostream> #include <cstdio&g ...

  9. PAT 天梯赛 L1-028. 判断素数 【水】

    题目链接 https://www.patest.cn/contests/gplt/L1-028 AC代码 #include <iostream> #include <cstdio&g ...

  10. PAT 天梯赛 L1-023. 输出GPLT 【水】

    题目链接 https://www.patest.cn/contests/gplt/L1-023 AC代码 #include <iostream> #include <cstdio&g ...

随机推荐

  1. 为什么 MongoDB 连接数被用满了?

    使用 MongoDB 时,可能会遇到因为 mongod 连接数用满了,导致客户端无法连接的问题.mongod的最大连接数通过 net.maxIncomingConnections 指定,默认值为100 ...

  2. Java反射机制的作用?

    Java反射机制的作用? 解答:Java反射机制的作用是: 1)在运行时判断任意一个对象所属的类. 2)在运行时构造任意一个类的对象. 3)在运行时判断任意一个类所具有的成员变量和方法. 4)在运行时 ...

  3. 蓝桥杯 第三届C/C++预赛真题(9) 夺冠概率(手工计算概率)

    足球比赛具有一定程度的偶然性,弱队也有战胜强队的可能. 假设有甲.乙.丙.丁四个球队.根据他们过去比赛的成绩,得出每个队与另一个队对阵时取胜的概率表: 甲 乙 丙 丁 甲 - 0.1 0.3 0.5乙 ...

  4. Linux服务器 大量的CLOSE_WAIT、TIME_WAIT解决办法

    http://itindex.net/detail/50213-%E6%9C%8D%E5%8A%A1%E5%99%A8-time_wait-close_wait http://itindex.net/ ...

  5. Objective-C中的instancetype和id关键字(转)

    转自:Objective-C中的instancetype和id关键字 一.什么是instancetype 同id一样,都是表示未知类型的的对象. 二.关联返回类型(related result typ ...

  6. (转)Unity笔记之编辑器(Foldout、HelpBox、InspectorTitlebar、Slider、MinMaxSlid ...

    1. Foldout.HelpBox 折叠菜单,大家都知道,不具体解释了,直接代码.因为折叠菜单中必然是有内容才能看到效果,所以顺带把HelpBox(提示框)也说了. [code]csharpcode ...

  7. Android开发:《Gradle Recipes for Android》阅读笔记(翻译)5.2——使用Android Testing Support Library进行测试

    问题: 你想要测试app的Android组件. 解决方案: 使用新的测试类实现JUnit风格的测试. 讨论: 测试像activities,services等的Android组件,需要将app部署到连接 ...

  8. iOS-@2x,@3x是什么意思

    当我们在公司使用UI给出的图片时候,xxx.png,xxx@2x.png,xxx@3x.png的时候,不知道分别代表着什么! 本人也是菜鸟一枚,全凭自己尝试理解而已,在尝试中得出下面的结论: xxx. ...

  9. 53、Gif 控件GifView 的使用,播放gif图片

    GifView 是一个为了解决android中现在没有直接显示gif的view,只能通过mediaplay来显示这个问题的项目,其用法和 ImageView一样,支持gif图片.可监视GIF是否加载成 ...

  10. poj2046

    Gap Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 1829   Accepted: 829 Description Le ...