73_猴子吃桃子

#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
    int N;
    cin>>N;
    int peach=1;
    while(--N){
        peach = peach+1;
        peach = peach*2;
    }
    cout<<peach;
    return 0;
}
发布了37 篇原创文章 · 获赞 4 · 访问量 1913

猜你喜欢

转载自blog.csdn.net/qq_41440031/article/details/104356788