P1634 禽兽的传染病

题目如下:

 

 思路:

<1> 1->11

     11->110

  最终 110+11=121

<2>cout一个数的话会默认为int

代码如下:

#include<cstdio>
#include<iostream> 
#include<cmath>
using namespace std;
int main(){
    long long x,n;
    cin>>x>>n;
    long long c=pow(x+1,n);
    cout<<c;
    
    return 0;
}

 

posted @ 2020-07-17 23:22  miao-xixixi  阅读(166)  评论(0编辑  收藏  举报