QQ空间


私信TA

用户名:uq_62605751476

访问量:79

签 名:

等  级
排  名 26570
经  验 523
参赛次数 0
文章发表 1
年  龄 0
在职情况 学生
学  校
专  业

  自我简介:

TA的其他文章

解题思路:

注意事项:

参考代码:

n1,n2=map(int,input().split())
lsA=list(map(int,input().split()))
copy_lsA=[_ for _ in lsA]
lsB=list(map(int,input().split()))
copy_lsB=[_ for _ in lsB]
sx=input()
d=0
A=1
B=1
for i in range(n1+n2):
    if sx[i]=='0':
        temp=min(lsA)
        A+=temp
        lsA.remove(temp)
        d=A**(1/2)
        B=d**3
        print('A'+str(copy_lsA.index(temp)+1))
    elif sx[i]=='1':
        temp=max(lsB)
        B+=temp
        lsB.remove(temp)
        d=B**(1/3)
        A=d**2
        print('B'+str(copy_lsB.index(temp)+1))
    else:
        break

print('E')


 

0.0分

1 人评分

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

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区