Snow_maple


私信TA

用户名:2016114438

访问量:20798

签 名:

我喜欢一个人,她叫鞠婧祎!

等  级
排  名 251
经  验 5798
参赛次数 2
文章发表 32
年  龄 0
在职情况 学生
学  校
专  业

  自我简介:

#include<iostream>
#include<string>
using namespace std;
int main(){
 string str1="0",str2="";
 int n;
 cin>>n;
 while(n--){
  for(int i=0;i<str1.length();i++){
   if(str1[i]=='0') str2.append("1");
   else str2.append("01");
  }
  str1 = str2;
  str2 = "";
 }
 cout<<str1<<endl;
}

解题思路:





注意事项:





参考代码:

 

0.0分

0 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答

代码解释器

  评论区