Description

The numbers of all offices in the new building of the Tax Office of IT City will have lucky numbers.

Lucky number is a number that consists of digits 7 and 8 only. Find the maximum number of offices in the new building of the Tax Office given that a door-plate can hold a number not longer than n digits.

Input

The only line of input contains one integer n (1 ≤ n ≤ 55) — the maximum length of a number that a door-plate can hold.

Output

Output one integer — the maximum number of offices, than can have unique lucky numbers not longer than n digits.

Examples
input
2
output
6
1位数的,7 8
2位数的,77 78 87 88
3位数的,777 778 787 788 877 878 887 888
.....
#include<stdio.h>
//#include<bits/stdc++.h>
#include<string.h>
#include<iostream>
#include<math.h>
#include<sstream>
#include<set>
#include<queue>
#include<map>
#include<vector>
#include<algorithm>
#include<limits.h>
#define inf 0x7fffffff
#define INF 0x7fffffffffffffff
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define LL long long
#define ULL unsigned long long
using namespace std;
LL powl(LL x, LL n)
{
LL pw = 1;
while (n > 0)
{
if (n & 1) // n & 1 等价于 (n % 2) == 1
pw *= x;
x *= x;
n >>= 1; // n >>= 1 等价于 n /= 2
}
return pw;
}
int main()
{
LL n;
LL num;
cin>>n;
cout<<powl(2,n+1)-2<<endl;
// printf("%.20f\n",n*powl(1.000000011,num));
return 0;
}

  

Experimental Educational Round: VolBIT Formulas Blitz C的更多相关文章

  1. Experimental Educational Round: VolBIT Formulas Blitz

    cf的一次数学场... 递推 C 题意:长度<=n的数只含有7或8的个数 分析:每一位都有2种可能,累加不同长度的方案数就是总方案数 组合 G 题意:将5个苹果和3个梨放进n个不同的盒子里的方案 ...

  2. Experimental Educational Round: VolBIT Formulas Blitz K

    Description IT City company developing computer games decided to upgrade its way to reward its emplo ...

  3. Experimental Educational Round: VolBIT Formulas Blitz N

    Description The Department of economic development of IT City created a model of city development ti ...

  4. Experimental Educational Round: VolBIT Formulas Blitz J

    Description IT City company developing computer games invented a new way to reward its employees. Af ...

  5. Experimental Educational Round: VolBIT Formulas Blitz F

    Description One company of IT City decided to create a group of innovative developments consisting f ...

  6. Experimental Educational Round: VolBIT Formulas Blitz D

    Description After a probationary period in the game development company of IT City Petya was include ...

  7. Experimental Educational Round: VolBIT Formulas Blitz B

    Description The city administration of IT City decided to fix up a symbol of scientific and technica ...

  8. Experimental Educational Round: VolBIT Formulas Blitz A

    Description The HR manager was disappointed again. The last applicant failed the interview the same ...

  9. Experimental Educational Round: VolBIT Formulas Blitz K. Indivisibility —— 容斥原理

    题目链接:http://codeforces.com/contest/630/problem/K K. Indivisibility time limit per test 0.5 seconds m ...

随机推荐

  1. 运行程序显示:Could not find version 8.3 of the MCR.

  2. python爬虫(10)--PyQuery的用法

    简介 pyquery 可让你用 jQuery 的语法来对 xml 进行操作.这I和 jQuery 十分类似.如果利用 lxml,pyquery 对 xml 和 html 的处理将更快. 初始化 在这里 ...

  3. c# ??和运算符先后的问题

    ; ; - not1??; Console.WriteLine(a); 输出结果为:10 问题因该是??运算符没有-的优先级高,实际这个 操作等于: ; ; - not1)??); 解决这个问题的办法 ...

  4. Linux uname命令

    一.简介 uname 命令将正在使用的操作系统名写到标准输出中. 二.语法 -a 显示 -m. -n. -r. -s 和 -v 标志指定的所有信息.不能与 -x 或 -SName 标志连用.如果 -x ...

  5. spoj2142 Arranging Flowers

    传送门 题目大意 给你n和m,表示一个n*n的数独已经填完了m行,让你填出剩下几行,要求答案的字典序最小. 分析 看到这道题我首先想到的是记录每行每列使用了哪些数字,然后贪心的来填,但是发现用这种策略 ...

  6. 1003 NOIP 模拟赛Day2 城市建设

    题面不好找放一个吧. Description 描述 在有$N$个地级市的H省,政府为了城市开发建设,决定先修路,后造房子,以吸引外来人员.一开始每个城市中有$b_i$个住户,而在两个城市$u,v$之间 ...

  7. Luogu 3934 Nephren Ruq Insania

    和Ynoi2016 炸脖龙重题了. BZOJ 5394. 首先是扩展欧拉定理: 一开始傻掉了……递归的层数和区间长度无关……也就是说我们每一次直接暴力递归求解子问题一定不会超过$logP$层,因为当模 ...

  8. 《Head First Servlets & JSP》-12-Web应用安全

    serlvet安全的4大要素 认证.授权.机密性和数据完整性. 容器完成认证和授权的过程 代码中不要有安全信息 大多数Web应用,大多数情况下Web应用的安全约束都应该以声明方式处理,即在部署描述文档 ...

  9. ios MVC笔记

    MVC:Model 模型 View 视图 Controller  控制器 关系图:

  10. python--输出spwm的数组

    python的功能是非常强大的,这个例子使用python编写的输出spwm数组(不对,在C语言或者其他语言叫做数组,在这里叫做list.)的程序,我们在单片机程序里调用这个程序,可以达到输出spwm波 ...