解题思路:
注意事项:
参考代码:
n = int(input()) def an(n): an='' for i in range(1,n+1): if i%2==0: an += f'-sin({i}' else: an +=f'+sin({i}' an += ')'*n return an[1:] def sn(n): sn=f'{an(1)}+{n}' for i in range(2,n+1): sn='('+sn+')'+f'{an(i)}+{n-i+1}' return sn print(sn(n))
0.0分
0 人评分