Experimental educational round:volbit formulas Blitz C

Source: Internet
Author: User

Description

The numbers of offices in the new building of the Office of the IT city would have lucky numbers.

Lucky number is a number, 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 Lon GER than n digits.

Input

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

Output

Output one integer-the maximum number of offices, than can has unique lucky numbers not longer than n Digi Ts.

Examples input
2
Output
6
1-digit, 7 8
2-digit, 77 78 87 88
3-digit, 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 longusing Namespa CE std; ll  Powl (ll X, ll N) {    ll pw = 1;    while (n > 0)    {        if (N & 1)        //N & 1 equivalent to (n% 2) = = 1            pw *= x;        x *= x;        n >>= 1;        N >>= 1 equivalent to 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.