不修仙的七


私信TA

用户名:luckinsven

访问量:7892

签 名:

Talk is cheap show me the code

等  级
排  名 3939
经  验 1722
参赛次数 6
文章发表 15
年  龄 25
在职情况 学生
学  校 gpnu
专  业

  自我简介:

None

 

0.0分

1 人评分

  评论区

def fun(n,s):
    temp=[]
    if n==0:
        for i in s:
            print(i,end="")
        return
    for i in range(len(s)):
        if s[i]=='0':
            temp.append('1')
        elif s[i]=='1':
            temp.append('0')
            temp.append('1')
    s.clear()
    s=temp    
    #print(s,"\n",temp)
    fun(n-1,s)


n=int(input())
s=['0']
fun(n,s)
2020-03-14 19:27:14
  • «
  • 1
  • »